summaryrefslogtreecommitdiff
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 01:53:02 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 01:53:02 +0000
commitef9206bbea3b8cb1af66966e74fe8527edab2418 (patch)
tree6150f80801b0de3e46bf2e673e04bb05815850f6 /ext/socket/rubysocket.h
parenta2d8643e9313590e339933d296ff13d8d85f6b45 (diff)
* 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
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 0ba473a..7aed973 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -159,6 +159,7 @@ extern VALUE rb_cUNIXServer;
#endif
extern VALUE rb_cSocket;
extern VALUE rb_cAddrInfo;
+extern VALUE rb_cSockOpt;
extern VALUE rb_eSocket;
@@ -242,6 +243,8 @@ VALUE sock_listen(VALUE sock, VALUE log);
VALUE s_accept(VALUE klass, int fd, struct sockaddr *sockaddr, socklen_t *len);
VALUE s_accept_nonblock(VALUE klass, rb_io_t *fptr, struct sockaddr *sockaddr, socklen_t *len);
+VALUE sockopt_new(int level, int optname, VALUE data);
+
void Init_basicsocket(void);
void Init_ipsocket(void);
void Init_tcpsocket(void);
@@ -252,6 +255,7 @@ void Init_unixsocket(void);
void Init_unixserver(void);
void Init_socket_constants(void);
void Init_addrinfo(void);
+void Init_sockopt(void);
void Init_socket_init(void);
#endif