sys::Obj sys::Virtual sys::Watch sox::SoxSession
public class SoxSession
SoxSession models a Dasp/Sox session.
public inline SocketAddr addr
public bool allTreeEvents
public inline Str errStr
public short idealMax
public long lastReceiveTicks
public long lastSendTicks
public long nonce
public short receiveTimeout
public inline ReceiveWindow receiveWindow
public short remoteId
public inline SendWindow sendWindow
public inline FileTransfer transfer
public User user
public bool authenticate(SoxService service, Str username, byte[] digest, int digestOff, int digestLen)
If authenticated, then update user field and return true, or return false if rejected.
public void challenge(SoxService service, int numFields)
Receive hello and respond with challenge.
public void close(SoxService service, int errorCode)
Close the dasp/sox session.
public void discoverResponse(SoxService service)
Send a discovery response.
public bool houseKeeping(SoxService service, long now, int houseKeepingTicks)
House keeping is used to check for retries, acks, keep-alives, and timeouts. Ideally it is called every SoxService.HOUSE_KEEPING_INTERVAL, but call rate may very based on App scanPeriod. It is never called more often then HOUSE_KEEPING_INTERVAL ms, but it may be called less frequently. houseKeepingTicks represents the number of intervals that have elapsed (rounded up) since the last time houseKeeping was called
For example, if HOUSE_KEEPING_INTERVAL is 100ms and 160 ms have elapsed since the last time the method was called, houseKeepingTicks = 2
public void keepAlive(SoxService service)
Send a keep alive message
public void reset()
Reset into a clean state for new session.
public static void skipHeader(BufInStream in, int typeId)
Skip a Dasp header field based on its typeId.
public void welcome(SoxService service, int numFields)
Receive authenticate and respond with welcome.