private void serverSynchronous(fastCSharp.code.cSharp.tcpBase.subByteArrayBuffer data, Action <fastCSharp.net.returnValue <tcpServer._o1> > _onReturn_, fastCSharp.net.callback <fastCSharp.net.returnValue <tcpServer._o1> > _callback_, bool _isTask_)
 {
     fastCSharp.net.returnValue <tcpServer._o1> _returnType_ = new fastCSharp.net.returnValue <tcpServer._o1>();
     try
     {
         fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
         if (_socket_ != null)
         {
             tcpServer._i1 _inputParameter_ = new tcpServer._i1
             {
                 data = data,
             };
             _socket_.Get(_onReturn_, _callback_, _c1, ref _inputParameter_, ref _returnType_.Value, _isTask_);
             return;
         }
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientDisposed;
     }
     catch (Exception _error_)
     {
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientException;
         fastCSharp.log.Error.Add(_error_, null, false);
     }
     if (_callback_ != null)
     {
         _callback_.Callback(ref _returnType_);
     }
     else if (_onReturn_ != null)
     {
         _onReturn_(_returnType_);
     }
 }
Ejemplo n.º 2
0
 private void xor(int left, int right, Action <fastCSharp.net.returnValue <tcpServer._o1> > _onReturn_, fastCSharp.net.callback <fastCSharp.net.returnValue <tcpServer._o1> > _callback_, bool _isTask_)
 {
     fastCSharp.net.returnValue <tcpServer._o1> _returnType_ = new fastCSharp.net.returnValue <tcpServer._o1>();
     try
     {
         fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
         if (_socket_ != null)
         {
             tcpServer._i1 _inputParameter_ = new tcpServer._i1
             {
                 left  = left,
                 right = right,
             };
             _socket_.Get(_onReturn_, _callback_, _c1, ref _inputParameter_, ref _returnType_.Value, _isTask_);
             return;
         }
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientDisposed;
     }
     catch (Exception _error_)
     {
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientException;
         fastCSharp.log.Error.Add(_error_, null, false);
     }
     if (_callback_ != null)
     {
         _callback_.Callback(ref _returnType_);
     }
     else if (_onReturn_ != null)
     {
         _onReturn_(_returnType_);
     }
 }
 private void send(string message, string[] users, Action <fastCSharp.net.returnValue> _onReturn_, fastCSharp.net.callback <fastCSharp.net.returnValue> _callback_, bool _isTask_)
 {
     fastCSharp.net.returnValue _returnType_;
     try
     {
         fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
         if (_socket_ != null)
         {
             tcpServer._i3 _inputParameter_ = new tcpServer._i3
             {
                 message = message,
                 users   = users,
             };
             _socket_.Call <tcpServer._i3>(_onReturn_, _callback_, _c3, ref _inputParameter_, _isTask_);
             return;
         }
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientDisposed;
     }
     catch (Exception _error_)
     {
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientException;
         fastCSharp.log.Error.Add(_error_, null, false);
     }
     if (_callback_ != null)
     {
         _callback_.Callback(ref _returnType_);
     }
     else if (_onReturn_ != null)
     {
         _onReturn_(_returnType_);
     }
 }
 private fastCSharp.net.tcp.commandClient.streamCommandSocket.keepCallback receive(Action <fastCSharp.net.returnValue <tcpServer._o4> > _onReturn_, fastCSharp.net.callback <fastCSharp.net.returnValue <tcpServer._o4> > _callback_, bool _isTask_)
 {
     fastCSharp.net.returnValue <tcpServer._o4> _returnType_ = new fastCSharp.net.returnValue <tcpServer._o4>();
     try
     {
         fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
         if (_socket_ != null)
         {
             return(_socket_.Get(_onReturn_, _callback_, _c4, ref _returnType_.Value, _isTask_));
         }
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientDisposed;
     }
     catch (Exception _error_)
     {
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientException;
         fastCSharp.log.Error.Add(_error_, null, false);
     }
     if (_callback_ != null)
     {
         _callback_.Callback(ref _returnType_);
     }
     else if (_onReturn_ != null)
     {
         _onReturn_(_returnType_);
     }
     return(null);
 }
 private void logout(Action <fastCSharp.net.returnValue> _onReturn_, fastCSharp.net.callback <fastCSharp.net.returnValue> _callback_, bool _isTask_)
 {
     fastCSharp.net.returnValue _returnType_;
     try
     {
         fastCSharp.net.tcp.commandClient.streamCommandSocket _socket_ = TcpCommandClient.StreamSocket;
         if (_socket_ != null)
         {
             _socket_.Call(_onReturn_, _callback_, _c1, _isTask_);
             return;
         }
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientDisposed;
     }
     catch (Exception _error_)
     {
         _returnType_.Type = fastCSharp.net.returnValue.type.ClientException;
         fastCSharp.log.Error.Add(_error_, null, false);
     }
     if (_callback_ != null)
     {
         _callback_.Callback(ref _returnType_);
     }
     else if (_onReturn_ != null)
     {
         _onReturn_(_returnType_);
     }
 }