public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" switch (hash) { case 23527: { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" this.ip = ((int)(global::haxe.lang.Runtime.toInt(@value))); #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" return(@value); } case 1158860648: { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" this.host = global::haxe.lang.Runtime.toString(@value); #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" return(@value); } case 1970444429: { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" this.ipAddress = ((global::System.Net.IPAddress)(@value)); #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" return(@value); } case 305151978: { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" this.hostEntry = ((global::System.Net.IPHostEntry)(@value)); #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" return(@value); } default: { #line 34 "/opt/haxe/std/cs/_std/sys/net/Host.hx" return(base.__hx_setField(field, hash, @value, handleProperties)); } } } #line default }
public Listener(int newport, global::SIPLib.DelRequest d1, string name, global::SIPLib.DelCloseSession d2, global::SIPLib.Del OUT, global::SIPLib.DelStopListener DelSL) { global::SIPLib.Listener.DelRequest1 = d1; global::SIPLib.Listener.DelClosesession = d2; global::SIPLib.Listener.DelOutput = OUT; global::SIPLib.Listener.DelClosesession += CloseSession; global::SIPLib.Listener.Delstoplistener = DelSL; global::SIPLib.Listener.StopFlag = false; global::SIPLib.Listener.myName = name; this.myIP = global::System.Net.Dns.GetHostEntry(host).AddressList[0]; global::SIPLib.Listener.port = newport; this.ThreadListen = new global::System.Threading.Thread(global::SIPLib.Listener.ListenSockets); this.ThreadListen.Start(); }
private bool SendSocket(string ToIP, int port, string Info) { global::System.Net.Sockets.UdpClient udpClient = new global::System.Net.Sockets.UdpClient(); byte[] sendBytes = global::System.Text.Encoding.ASCII.GetBytes(Info); global::System.Net.IPAddress ipAddress = null; if (!System.Net.IPAddress.TryParse(ToIP, out ipAddress)) { return(false); } ; global::System.Net.IPEndPoint ipEndPoint = new global::System.Net.IPEndPoint(ipAddress, port); try { udpClient.Send(sendBytes, sendBytes.Length, ipEndPoint); } catch { return(false); } return(true); }
public Session(global::System.Net.IPAddress myIP, int myPort, string ToIP, string ToUser, string FromUser, global::SIPLib.DelCloseSession d1, string ID, string SDPfunc) { this.ToIP = ToIP; this.ToUser = ToUser; this.MyName = FromUser; this.myIP = myIP; this.port = myPort; this.myaudioport = 11010; this.SessionID = ID; this.DelClosesession = d1; this.n++; if (SDPfunc.Length != 0) { this._SDP = this.SDPcombine(SDPfunc); } else { this._SDP = this.SDP(); } }