예제 #1
0
        public void sendMesg(byte[] buf, TCPSendType tcpSend)
        {
            if (tcpSend == TCPSendType.PUTONG)
            {
                sendMesg(buf);
            }
            else if (tcpSend == TCPSendType.FORWORD)
            {
                try
                {
                    if (m_socket != null)
                    {
                        m_socket.SendOnlineMessage(buf);
                    }
                    return;

                    Dictionary <string, Socket> forwardDictCache = new Dictionary <string, Socket>(forwardDict); //缓存一个地址出来
                    foreach (var Item in forwardDictCache)
                    {
                        try
                        {
                            Item.Value.Send(buf);
                        }
                        catch (SocketException e)
                        {
                            break;
                        }
                    }
                }
                catch (Exception e)
                {
                    Debug.Write("TCPServer.sendMesg.." + e.Message);
                    FileModel.getFlModel().setErrorData("<<<<TCPServer.sendMesg.." + e.Message + ">>>>\r\n");
                }
            }
        }
예제 #2
0
 public void sendMesg(byte[] buf, TCPSendType tcpSend)
 {
 }