Sedona

sox::SoxSession


sys::Obj
  sys::Virtual
    sys::Watch
      sox::SoxSession

public class SoxSession

SoxSession models a Dasp/Sox session.


addr

public inline SocketAddr addr

allTreeEvents

public bool allTreeEvents

errStr

public inline Str errStr

idealMax

public short idealMax

lastReceiveTicks

public long lastReceiveTicks

lastSendTicks

public long lastSendTicks

nonce

public long nonce

receiveTimeout

public short receiveTimeout

receiveWindow

public inline ReceiveWindow receiveWindow

remoteId

public short remoteId

sendWindow

public inline SendWindow sendWindow

transfer

public inline FileTransfer transfer

user

public User user

authenticate

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.

challenge

public void challenge(SoxService service, int numFields)

Receive hello and respond with challenge.

close

public void close(SoxService service, int errorCode)

Close the dasp/sox session.

discoverResponse

public void discoverResponse(SoxService service)

Send a discovery response.

houseKeeping

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

keepAlive

public void keepAlive(SoxService service)

Send a keep alive message

reset

public void reset()

Reset into a clean state for new session.

skipHeader

public static void skipHeader(BufInStream in, int typeId)

Skip a Dasp header field based on its typeId.

welcome

public void welcome(SoxService service, int numFields)

Receive authenticate and respond with welcome.