[w32socket] Use coop handles for icalls in System.Net.Sockets.Socket
authorAleksey Kliger <aleksey@xamarin.com>
Tue, 30 May 2017 19:58:51 +0000 (15:58 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Mon, 5 Jun 2017 19:01:47 +0000 (15:01 -0400)
commit2251178eacd4a5b5e26067271f8451f0fe4b1a82
treead2d6226d365342d2ac6aef55a1d68968815f0ff
parent7daf4b739edb95986dca77398d898b42b448ee7d
[w32socket] Use coop handles for icalls in System.Net.Sockets.Socket

- Use coop handles for create_object_from_sockaddr

  Eventually want to rewrite its callers to use
  create_object_handle_from_sockaddr directly.

- Use coop handles for

  - LocalEndPoint_internal

  - RemoteEndPoint_internal

- inside create_sockaddr_from_object

  Eventually callers should be updated to use create_sockaddr_form_handle
  directly.

- Use coop handles for

  - ReceiveFrom_internal

  - Bind_internal

  - Connect_internal

  - SendTo_internal

- Remove dead code (create_object_from_sockaddr, create_sockaddr_from_object)

- Use coop handles for

  - Receive_internal WSABUF[]

  - Receive_internal byte[]

  - Send_internal

  - Send_array_internal

  - SetSocketOption_internal

  - GetSocketOption_arr_internal

  - GetSocketOption_obj_internal

  - IOControl_internal

  - SendFile_internal

- Remove more dead code

- Use coop handles for

  - Socket_internal

  - Select_internal

- Trivial coop handles conversion for several icalls in System.Net.Sockets.Socket

  None of these functions use managed objects, so just add a MonoError* argument.
mono/metadata/icall-def.h
mono/metadata/w32socket-unix.c
mono/metadata/w32socket-win32.c
mono/metadata/w32socket.c
mono/metadata/w32socket.h