/// <summary> /// Starte Verbindung / Server /// </summary> /// <returns></returns> public override bool Connect() { running = true; try { lock (SyncConnect) { System.Net.IPAddress ip = System.Net.IPAddress.Any; if ((endpointAdress != null) && (endpointAdress != String.Empty)) ip = System.Net.IPAddress.Parse(endpointAdress); if ((commType == Communicationtype.Recieve) || (commType == Communicationtype.Send)) { client = new UDPDataClient(endpointAdress, endpointPort,commType); ((UDPDataClient)client).DataRecieved += new UDPDataClient.RecieveHandler(server_DataRecieved); client.Connect(); } } } catch (Exception ex) { } finally { } return true; }
/// <summary> /// Starte Verbindung / Server /// </summary> /// <returns></returns> public override bool Connect() { running = true; try { lock (SyncConnect) { System.Net.IPAddress ip = System.Net.IPAddress.Any; if ((endpointAdress != null) && (endpointAdress != String.Empty)) { ip = System.Net.IPAddress.Parse(endpointAdress); } if ((commType == Communicationtype.Recieve) || (commType == Communicationtype.Send)) { client = new UDPDataClient(endpointAdress, endpointPort, commType); ((UDPDataClient)client).DataRecieved += new UDPDataClient.RecieveHandler(server_DataRecieved); client.Connect(); } } } catch (Exception ex) { } finally { } return(true); }