public void Connect(string host, int port) { rlGlueConnection = new RlGlueConnection(); rlGlueConnection.Connect(host, port); rlGlueConnection .Send() .State(RlGlueConnection.ConnectionState.ExperimentConnection) .And() .SizeOfState() .Flush(); }
protected internal virtual void onAgentInit() { string taskSpec; rlGlueConnection .Receive() .String(out taskSpec); agent.AgentInit(taskSpec); rlGlueConnection .Send() .State(RlGlueConnection.ConnectionState.AgentInitialize) .And() .SizeOfState() .Flush(); }
protected internal virtual void onEnvInit() { string taskSpec = environment.EnvironmentInit(); rlGlueConnection .Send() .State(RlGlueConnection.ConnectionState.EnvironmentInitialize) .And() .SizeOfState() .AndSizeOfString(taskSpec) .And() .String(taskSpec) .Flush(); }
public virtual string RLInit() { rlGlueConnection .Send() .State(RlGlueConnection.ConnectionState.RLInit) .And() .SizeOfState() .Flush(); ReceiveAndVerifyState(RlGlueConnection.ConnectionState.RLInit); return(rlGlueConnection.Receive().String()); }