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, writePacketpublic 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 PacketHandlerIOException - If a network error occurs.public final boolean hasAsynchronousMode()
public SMBSrvPacket readPacket() throws IOException
readPacket in class PacketHandlerIOExceptionpublic void writePacket(SMBSrvPacket pkt, int len, boolean writeRaw) throws IOException
writePacket in class PacketHandlerpkt - SMBSrvPacketlen - intwriteRaw - booleanIOExceptionpublic void flushPacket()
throws IOException
flushPacket in class PacketHandlerIOException - If a network error occurspublic void closeHandler()
closeHandler in class PacketHandlerpublic int getQueuedWriteCount()
getQueuedWriteCount in interface AsynchronousWritesHandlerpublic int processQueuedWrites()
processQueuedWrites in interface AsynchronousWritesHandlerCopyright © 2005–2014 Alfresco Software. All rights reserved.