1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

14 commits

Author SHA1 Message Date
akr
7d1e856766 * ext/socket/init.c (wait_connectable0): remove unreachable code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 14:04:05 +00:00
akr
aa2b22bba2 * ext/socket/ (rsock_getfamily): renamed from rb_sock_getfamily.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 11:58:13 +00:00
akr
172d208789 * ext/socket/ (rsock_make_hostent): renamed from sock_make_hostent.
(rsock_addrinfo): renamed from sock_addrinfo.
  (rsock_getaddrinfo): renamed from sock_getaddrinfo.
  (rsock_socket): renamed from ruby_socket.
  (rsock_sock_s_socketpair): renamed from sock_s_socketpair.
  (rsock_connect): renamed from ruby_connect.

* ext/socket/socket.c (sock_listen): make it static.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 06:48:22 +00:00
akr
c49f05dd79 * ext/socket: add rsock_prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 06:30:41 +00:00
akr
22cef963c3 * ext/socket/init.c (s_recvfrom): use rb_io_wait_readable after
recvfrom.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 10:28:38 +00:00
nobu
0ec57a60af * ext/socket/init.c (s_recvfrom_nonblock): handles EAGAIN too.
* ext/socket/init.c (s_accept_nonblock): ditto, and EPROTO depends
  on platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 04:38:46 +00:00
akr
9cfe35ad50 * io.c (io_getpartial): error message describes what should be
waited after nonblocking error.
  (rb_io_write_nonblock): ditto.

* ext/socket/init.c (s_recvfrom_nonblock): ditto.
  (s_accept_nonblock): ditto.

* ext/socket/socket.c (sock_connect_nonblock): ditto.

* ext/socket/ancdata.c (bsock_sendmsg_internal): ditto.
  (bsock_recvmsg_internal): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-21 15:57:52 +00:00
akr
2ee0859119 * ext/socket/init.c (struct recvfrom_arg): use struct
sockaddr_storage.
  (recvfrom_blocking): follow struct recvfrom_arg change.
  (s_recvfrom): ditto.
  (s_recvfrom_nonblock): use struct sockaddr_storage.

* ext/socket/socket.c (sock_accept): use struct sockaddr_storage.
  (sock_accept_nonblock): ditto.
  (sock_sysaccept): ditto.

* ext/socket/ancdata.c (bsock_recvmsg_internal): use struct
  sockaddr_storage.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 14:46:51 +00:00
akr
f5da7031b9 * ext/socket/rubysocket.h (level_arg): add family argument.
(optname_arg): ditto.
  (cmsg_type_arg): ditto.
  (rb_sock_getfamily): declared.

* ext/socket/constants.c (level_arg): add family argument.
  (optname_arg): ditto.
  (cmsg_type_arg): ditto.

* ext/socket/init.c (rb_sock_getfamily): defined.

* ext/socket/option.c (sockopt_initialize): give family for level_arg
  and optname_arg.
  (sockopt_s_int): ditto.

* ext/socket/basicsocket.c (bsock_setsockopt): ditto.
  (bsock_getsockopt): ditto.

* ext/socket/ancdata.c (ancillary_initialize): ditto.
  (ancillary_s_int): ditto.
  (ancillary_cmsg_is_p): ditto.
  (bsock_sendmsg_internal): ditto.
  (bsock_recvmsg_internal): use rb_sock_getfamily.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 13:56:43 +00:00
akr
88f04bdd32 * ext/socket: AddrInfo is renamed to Addrinfo. [ruby-dev:37876]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:01:43 +00:00
akr
61fc0c6cf4 * ext/socket/rubysocket.h (cmsg_type_arg): declared.
(Init_ancdata): ditto.

* ext/socket/init.c (Init_socket_init): call Init_ancdata.

* ext/socket/constants.c (cmsg_type_arg): defined.

* ext/socket/depend: add dependency for ancdata.o.

* ext/socket/mkconstants.rb: generate scm_optname_to_int.
  more constants.

* ext/socket/extconf.rb: add ancdata.o.

* ext/socket/ancdata.c: new file.  new method
  BasicSocket#{sendmsg,sendmsg_nonblock,recvmsg,recvmsg_nonblock}



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 02:51:02 +00:00
akr
ef9206bbea * ext/socket/rubysocket.h (rb_cSockOpt): declared.
(sockopt_new): ditto.
  (Init_sockopt): ditto.

* ext/socket/init.c (Init_socket_init): call Init_sockopt.

* ext/socket/depend: add dependency for option.o

* ext/socket/mkconstants.rb: generate intern_level, intern_so_optname,
  intern_ip_optname, intern_ipv6_optname, intern_tcp_optname,
  intern_udp_optname and intern_scm_optname.

* ext/socket/extconf.rb: add option.o.

* ext/socket/basicsocket.c (bsock_setsockopt): accept Socket::Option
  object.
  (bsock_getsockopt): return Socket::Option object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 01:53:02 +00:00
akr
2d958b7fb0 * ext/socket/init.c (socks_connect_blocking): moved from
sockssocket.c.  [ruby-dev:37834]

* sockssocket.c (socks_init): don't omit "int" type.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-27 11:07:41 +00:00
akr
97cbab78dc * ext/socket: split files for each class.
* ext/socket/rubysocket.h: common header.

* ext/socket/basicsocket.c: new file for BasicSocket.

* ext/socket/ipsocket.c: new file for IPSocket.

* ext/socket/tcpsocket.c: new file for TCPSocket.

* ext/socket/tcpserver.c: new file for TCPServer.

* ext/socket/sockssocket.c: new file for SOCKSSocket.

* ext/socket/udpsocket.c: new file for UDPSocket.

* ext/socket/unixsocket.c: new file for UNIXSocket.

* ext/socket/unixserver.c: new file for UNIXServer.

* ext/socket/socket.c: now for Socket.

* ext/socket/raddrinfo.c: new file for AddrInfo and name resolution.

* ext/socket/constants.c: new file for constants.

* ext/socket/init.c: new file for utilities.

* ext/socket/mkconstants.rb: export *_to_int.

* ext/socket/extconf.rb: add new object files.

* ext/socket/depend: add dependencies for new files.

* ext/.document: add new files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 04:11:27 +00:00