private void Send(int messageID, object data, IPEndPoint remoteIP) { SendCell cell = new SendCell(messageID, data); byte[] buffer = cell.ToBuffer(); UdpPeer.Send(cell, remoteIP); }
public void Dispose() { if (_udpPeer != null) { _udpPeer.Dispose(); _udpPeer = null; } if (_sendFileManagerList != null && _sendFileManagerList.Count > 0) { foreach (SendFileManager sendFileManager in _sendFileManagerList.Values) { sendFileManager.Dispose(); } _sendFileManagerList.Clear(); } }
public void Dispose() { if (_udpPeer != null) { _udpPeer.Dispose(); _udpPeer = null; } if (_receiveFileManagerList != null && _receiveFileManagerList.Count > 0) { foreach (ReceiveFileManager receiveFileManager in _receiveFileManagerList.Values) { receiveFileManager.Dispose(); } _receiveFileManagerList.Clear(); } }
public void Start() { UdpPeer.Start(); }