nobu
4822d20cc5
* ext/socket: fixed types.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28 08:14:13 +00:00
nobu
977267c2e0
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:04:13 +00:00
akr
a4fa54a10a
* ext/socket: use rsock_ prefix for internal initialization functions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22 16:15:21 +00:00
akr
652484598d
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22 09:45:57 +00:00
akr
1561d3fb8b
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22 03:33:14 +00:00
akr
daa739876f
* ext/socket: make sources rdoc friendly.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21 10:50:52 +00:00
akr
7fbf889605
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23 11:41:55 +00:00
akr
d784451678
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 08:41:13 +00:00
akr
29d994d33d
update rdoc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-31 08:39:05 +00:00
akr
9c4ac94a8e
fix typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04 12:02:37 +00:00
akr
05a278b4cd
* ext/readline/readline.c: use rb_f_notimplement for methods not
...
implemented.
* ext/openssl/ossl_engine.c: ditto.
* ext/openssl/ossl_config.c: ditto.
* ext/openssl/ossl_cipher.c: ditto.
* ext/openssl/ossl_pkcs5.c: ditto.
* ext/openssl/ossl_x509ext.c: ditto.
* ext/socket/socket.c: ditto.
* ext/socket/basicsocket.c: ditto.
* ext/socket/ancdata.c: ditto.
* ext/socket/unixsocket.c: ditto.
* ext/iconv/iconv.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 14:10:06 +00:00
akr
c4049f4cb6
* io.c (rb_mWaitReadable): defined.
...
(rb_mWaitWritable): defined.
(io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN.
(rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and
EAGAIN.
* error.c (make_errno_exc): extracted from rb_sys_fail.
(rb_mod_sys_fail): new function.
* include/ruby/ruby.h (rb_mod_sys_fail): declared.
(rb_mWaitReadable): declared.
(rb_mWaitWritable): declared.
* ext/socket/init.c (rsock_s_recvfrom_nonblock): extend
IO::WaitReadable on EWOULDBLOCK and EAGAIN.
(rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK,
EAGAIN, ECONNABORTED and EPROTO.
* ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable
on EINPROGRESS.
* ext/socket/ancdata.c (bsock_sendmsg_internal): extend
IO::WaitWritable on EWOULDBLOCK and EAGAIN.
(bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and
EAGAIN.
* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError
extended by IO::WaitReadable/IO::WaitWritable on
SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
* ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise.
(ossl_exc_new): new function.
* ext/openssl/ossl.h (ossl_exc_new): declared.
* lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and
IO::WaitWritable.
[ruby-core:22539], [ruby-dev:38140]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 11:40:38 +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
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
9842858add
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:43:12 +00:00
akr
840e6c70e8
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 12:01:53 +00:00
akr
7a01268aeb
* ext/socket/basicsocket.c (bsock_getpeereid): implemented for Solaris
...
using getpeerucred.
* ext/socket/extconf.rb: check ucred.h and getpeerucred.
* ext/socket/rubysocket.h: include ucred.h if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12 12:43:04 +00:00
akr
b4e50055c3
* ext/socket/extconf.rb: check getpeereid.
...
* ext/socket/basicsocket.c (bsock_getpeereid): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 01:22:08 +00:00
akr
6245caf58c
* ext/socket/basicsocket.c (bsock_getpeername): use struct
...
sockaddr_storage.
(bsock_local_address): ditto.
(bsock_remote_address): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-10 14:31:21 +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
8977fe1e36
* ext/socket/basicsocket.c (bsock_getsockname): use sockaddr_storage.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 11:19:57 +00:00
akr
7d63280c17
* ext/socket/basicsocket.c (bsock_getsockopt): refine address family
...
examination.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-09 10:59:55 +00:00
akr
c02ce88762
* ext/socket/rubysocket.h (sockopt_new): add family argument.
...
* ext/socket/option.c (sockopt_initialize): add vfamily argument.
(sockopt_new): add family argument and record it in the object.
(sockopt_family): new method.
(sockopt_s_int): add vfamily argument.
(sockopt_inspect): show family.
* ext/socket/basicsocket.c (bsock_getsockopt): check address family
using getsockname.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 15:12:27 +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
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
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