public class WinsockNetBIOSPacketHandler extends PacketHandler implements AsynchronousWritesHandler
Uses a Windows Winsock NetBIOS socket to provide the low level session layer for better integration with Windows.
Constructor and Description |
---|
WinsockNetBIOSPacketHandler(int lana,
NetBIOSSocket sock,
CIFSPacketPool packetPool,
boolean asyncMode)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
int |
availableBytes()
Return the count of available bytes in the receive input stream
|
void |
closeHandler()
Close the Winsock NetBIOS packet handler.
|
void |
flushPacket()
Flush the output socket
|
int |
getLANA()
Return the LANA number
|
int |
getQueuedWriteCount()
Return the count of queued writes
|
NetBIOSSocket |
getSocket()
Return the NetBIOS socket
|
boolean |
hasAsynchronousMode()
Check if asynchronous mode is enabled
|
int |
processQueuedWrites()
Process the write queue and send pending data until outgoing buffers are full
|
SMBSrvPacket |
readPacket()
Read a packet from the client
|
void |
writePacket(SMBSrvPacket pkt,
int len,
boolean writeRaw)
Write a packet to the client
|
getClientName, getPacketPool, getRemoteAddress, getShortName, hasClientName, hasDebug, hasRemoteAddress, isProtocol, isProtocolName, rethrowException, setClientName, setDebug, setRemoteAddress, writePacket, writePacket
public WinsockNetBIOSPacketHandler(int lana, NetBIOSSocket sock, CIFSPacketPool packetPool, boolean asyncMode)
lana
- intsock
- NetBIOSSocketpacketPool
- CIFSPacketPoolasyncMode
- booleanpublic final int getLANA()
public final NetBIOSSocket getSocket()
public int availableBytes() throws IOException
availableBytes
in class PacketHandler
IOException
- If a network error occurs.public final boolean hasAsynchronousMode()
public SMBSrvPacket readPacket() throws IOException
readPacket
in class PacketHandler
IOException
public void writePacket(SMBSrvPacket pkt, int len, boolean writeRaw) throws IOException
writePacket
in class PacketHandler
pkt
- SMBSrvPacketlen
- intwriteRaw
- booleanIOException
public void flushPacket() throws IOException
flushPacket
in class PacketHandler
IOException
- If a network error occurspublic void closeHandler()
closeHandler
in class PacketHandler
public int getQueuedWriteCount()
getQueuedWriteCount
in interface AsynchronousWritesHandler
public int processQueuedWrites()
processQueuedWrites
in interface AsynchronousWritesHandler
Copyright © 2005–2017 Alfresco Software. All rights reserved.