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 java.io.IOException
availableBytes in class PacketHandlerjava.io.IOException - If a network error occurs.public final boolean hasAsynchronousMode()
public SMBSrvPacket readPacket() throws java.io.IOException
readPacket in class PacketHandlerjava.io.IOExceptionpublic void writePacket(SMBSrvPacket pkt, int len, boolean writeRaw) throws java.io.IOException
writePacket in class PacketHandlerpkt - SMBSrvPacketlen - intwriteRaw - booleanjava.io.IOExceptionpublic void flushPacket()
throws java.io.IOException
flushPacket in class PacketHandlerjava.io.IOException - If a network error occurspublic void closeHandler()
closeHandler in class PacketHandlerpublic int getQueuedWriteCount()
getQueuedWriteCount in interface AsynchronousWritesHandlerpublic int processQueuedWrites()
processQueuedWrites in interface AsynchronousWritesHandlerCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.