Beispiel #1
0
 public Writer(RpcSocket socket, Header header, Popper popper)
 {
     this.socket = socket;
       this.header = header;
       this.popper = popper;
       mS = new MemoryStream();
       bW = new BinaryWriter(mS);
 }
Beispiel #2
0
 public Writer(RpcSocket socket, Header header, Popper popper)
 {
     this.socket = socket;
     this.header = header;
     this.popper = popper;
     mS          = new MemoryStream();
     bW          = new BinaryWriter(mS);
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="header"></param>
 /// <param name="host">Name in host file or DNS.</param>
 /// <param name="service">Service port. Expects a number.</param>
 /// <param name="timeout">
 /// Timeout in millisecs. Passed through to RpcSocket.
 /// </param>
 public Popper(Header header, string host, string service, int timeout)
 {
     try
     {
         this.header = header;
         this.socket = new RpcSocket(host, int.Parse(service), timeout);
     }
     catch (Exception ex)
     {
         throw new RpcException(string.Format("Error connecting to host:{0} service:{1} timeout:{2}"
                                              , host, service, timeout), ex);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Constructor if you already have an RpcSocket instantiated.
 /// </summary>
 /// <param name="header">
 /// Base header class. This is an abstract class so you would use a derived 
 /// class for this
 /// </param>
 /// <param name="socket">
 /// RpcSocket instance.
 /// </param>
 public Popper(Header header, RpcSocket socket)
 {
     this.header = header;
       this.socket = socket;
 }
Beispiel #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="header"></param>
 /// <param name="host">Name in host file or DNS.</param>
 /// <param name="service">Service port. Expects a number.</param>
 /// <param name="timeout">
 /// Timeout in millisecs. Passed through to RpcSocket.
 /// </param>
 public Popper(Header header, string host, string service, int timeout)
 {
     try
       {
     this.header = header;
     this.socket = new RpcSocket(host, int.Parse(service), timeout);
       }
       catch(Exception ex)
       {
     throw new RpcException(string.Format("Error connecting to host:{0} service:{1} timeout:{2}"
       , host, service, timeout), ex);
       }
 }
Beispiel #6
0
 /// <summary>
 /// Constructor if you already have an RpcSocket instantiated.
 /// </summary>
 /// <param name="header">
 /// Base header class. This is an abstract class so you would use a derived
 /// class for this
 /// </param>
 /// <param name="socket">
 /// RpcSocket instance.
 /// </param>
 public Popper(Header header, RpcSocket socket)
 {
     this.header = header;
     this.socket = socket;
 }