[MonoTouch] Missing Beginnconnect in sockets, Bug?

Andreas Ploetzeneder info at ploetzeneder-it.com
Sat Oct 22 07:48:46 EDT 2011


Hi,
could it be that there is missing the beginnconect of sockets:

I get "system.net.sockets.socket does not contain a definition for
beginconnect" but i see it, as an option to program...

 Socket msocket = null;

 String ergebnis = null;

 bool connectworked=false;

 bool errorreceive=false;

 try  {

  IPEndPoint ip = new IPEndPoint (IPAddress.Parse (ipadresse), port);

  msocket = new Socket (ip.AddressFamily,
SocketType.Stream,ProtocolType.Tcp);

    Console.WriteLine ("vorconnect");

  //socket.Connect (ip);

  IAsyncResult ar = msocket.BeginConnect(ip,null,null);

  ar.AsyncWaitHandle.WaitOne(10000); // 10 Seks warten

  if(!ar.IsCompleted)

  {

    msocket.Close();

    throw new ApplicationException("keine Verbindung....");

  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111022/fc73ae29/attachment.html 


More information about the MonoTouch mailing list