aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket
Commit message (Collapse)AuthorAgeFilesLines
* * win32/Makefile.sub (COMMON_HEADERS): include ws2tcpip.h.usa2008-06-061-0/+5
| | | | | | | | | | | | * ext/socket/addrinfo.h (addrinfo, getaddrinfo, getnameinfo, freehostent, freeaddrinfo): undef before define because these are macros in some versions of Windows SDK. merged from ruby_1_8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * $Date$ keyword removed to avoid inclusion of locale dependentakr2008-01-062-2/+0
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * util.c (ruby_strtoul): locale independent strtoul is implemented toakr2008-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | avoid "i".to_i(36) cause 0 under tr_TR locale. This is newly implemented, not a copy of missing/strtoul.c. * include/ruby/ruby.h (ruby_strtoul): declared. (STRTOUL): defined to use ruby_strtoul. * bignum.c, pack.c, ext/socket/socket.c: use STRTOUL. * configure.in (strtoul): don't check. * missing/strtoul.c: removed. * include/ruby/missing.h (strtoul): removed. * common.mk (strtoul.o): removed. * LEGAL (missing/strtoul.c): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use EWOULDBLOCK as an example in document.akr2007-12-291-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: a patch to support IRIX from Andrewmatz2007-12-271-0/+4
| | | | | | Thompson <andrew@hijacked.us> in [ruby-core:14447]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rescue Errno::EWOULDBLOCK as well as Errno::EAGAIN in sample code in rdoc.akr2007-10-231-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (s_accept_nonblock): make accepted fdakr2007-10-141-0/+19
| | | | | | | nonblocking. [ruby-talk:274079] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c: provide basic features for M17N.matz2007-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_file_s_rename): deleted code to get rid of a bug ofnobu2007-07-221-4/+1
| | | | | | | | | | | | | | | | | | | | | | | old Cygwin. * file.c (rb_file_truncate): added prototype of GetLastError() on cygwin. [ruby-dev:31239] * include/ruby/intern.h (is_ruby_native_thread): prototype. * missing/strftime.c (strftime): fix printf format and actual arguments. * ext/Win32API/Win32API.c (Win32API_initialize): ditto. * ext/tk/tcltklib.c (ip_finalize): ditto. * ext/win32ole/win32ole.c (lcid_installed): ditto. * ext/socket/getnameinfo.c: include stdio.h always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby: moved public headers.nobu2007-06-104-9/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* clear cmsg padding.akr2007-04-251-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (unix_send_io, unix_recv_io): use CMSG_DATA toakr2007-04-251-12/+12
| | | | | | | align file descriptor appropriately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (s_recv, s_recvfrom): some systems (such asusa2007-04-031-2/+2
| | | | | | | | | windows) doesn't set fromlen if the socket is connection-oriented. reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz2007-03-191-1/+1
| | | | | | Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c, gc.c, io.c, ruby.h, rubyio.h, win32/win32.h (rb_io_t):nobu2007-02-241-41/+41
| | | | | | | | | | | renamed from OpenFile. * ext/dl/cptr.c, ext/io/wait/wait.c, ext/openssl/ossl.h, ext/openssl/ossl_bio.c, ext/openssl/ossl_ssl.c, ext/pty/pty.c, ext/readline/readline.c, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (unix_peeraddr): wrong syscall name in errormatz2007-02-191-1/+1
| | | | | | | message for #peeraddr. a patch from Sam Roberts <sroberts at uniserve.com>. [ruby-core:10366] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (init_unixsock): path may contain NUL formatz2007-02-131-2/+2
| | | | | | abstract unix sockets. [ruby-core:10288] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: fix errors in socket sample code.matz2007-01-221-2/+2
| | | | | | [ruby-core:09992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (ruby_getnameinfo__aix): AF_INET6 workaroundmatz2006-11-022-0/+32
| | | | | | | | for AIX. a patch from Yutaka Kanemoto <kinpoco AT gmail.com>. [ruby-dev:29744] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.c: a rdoc patch from Daniel Berger <djberg96 at gmail.com>matz2006-09-261-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t.akr2006-09-021-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: check arpa/inet.h for ntohs.akr2006-09-022-1/+6
| | | | | | | * ext/socket/socket.c: include arpa/inet.h if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RArray): embed small arrays.matz2006-09-021-11/+11
| | | | | | | | | | (RARRAY_LEN): defined for accessing array members. (RARRAY_PTR): ditto. * array.c: use RARRAY_LEN and RARRAY_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (socks_init): typo fixed. a patch from Svenmatz2006-09-011-1/+1
| | | | | | | Klemm <sven at c3d2.de>. [ruby-core:08770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-311-37/+35
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: ANSIfied. [ruby-core:08601]akr2006-08-131-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, common.mk: AIX link issue. a patch from Yutakamatz2006-08-071-0/+6
| | | | | | | | | Kanemoto <kinpoco at gmail.com>. [ruby-dev:29190] * ext/socket/socket.c: AIX socket support. [ruby-dev:29190] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c: RDoc update for =~ method. a patch from Alex Youngmatz2006-06-271-2/+1
| | | | | | | | | | | | | | | | <alex at blackkettle.org>. [ruby-core:08068] * io.c (pipe_open): backout unnecessary fix on 2006-06-26. [ruby-dev:28865] * eval.c (rb_yield_0): exact argument number check now done only for lambda Proc. * eval.c (rb_yield_0): add check for number of arguments, if there's one lambda block parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (bsock_recv_nonblock): new methodakr2006-06-261-100/+96
| | | | | | | | | | | BasicSocket#recv_nonblock. (udp_recvfrom_nonblock): renamed from ip_recvfrom_nonblock. IPSocket#recvfrom_nonblock is moved to UDPSocket#recvfrom_nonblock. (unix_recvfrom_nonblock): removed. UNIXSocket#recvfrom_nonblock is removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert sock_sysaccept addition to [ruby-dev:28861].akr2006-06-261-3/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sock_accept): revert to avoid ambiguity ofmatz2006-06-261-7/+11
| | | | | | | | | | | | | | | argument evaluation order. [ruby-dev:28861] * ext/socket/socket.c (sock_accept_nonblock): ditto. * io.c (pipe_open): avoid closing uninitialized file descriptors. a patch from <tommy at tmtm.org> [ruby-dev:28600] * parse.y: replace terminal token names with more descriptive name, i.e. kEND to keyword_end. [ruby-list:42477] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add extconf.h to .cvsignore.akr2006-06-241-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sock_s_socketpair): try GC only once.akr2006-06-211-7/+9
| | | | | | | [ruby-dev:28778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/getaddrinfo.c (freeaddrinfo, get_name): fixed typo.usa2006-06-211-2/+1
| | | | | | | | | * ext/tk/tcltklib.c (tcl_eval, tcl_global_eva): ditto. * ext/zlib/zlib.c (rscheck): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, file.c, etc.: code-cleanup patch from Stefan Huehnermatz2006-06-202-39/+9
| | | | | | | <stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (unix_sysaccept): typo fixed.matz2006-06-191-2/+1
| | | | | | | | * ext/socket/socket.c (sock_connect): remove an unused local variable tmpaddr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (tcp_accept_nonblock): forgot to removematz2006-06-191-13/+3
| | | | | | | abandoned hacks. [ruby-dev:28740] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (Init_eval): add aliases invoke_method andmatz2006-06-171-294/+140
| | | | | | | | | | | | | | | | | | invoke_functional_method corresponding send and funcall respectively. [ruby-talk:197512] * parse.y (parser_yylex): returns the most typical keyword token on EXPR_FNAME. [ruby-core:7995] * ext/socket/socket.c: protoize. * parse.y (then): remove ':' from 'then' and 'do' rules. * hash.c (env_aset): raise TypeError on nil with more descriptive message. [ruby-core:07990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (Init_socket): remove obsolete constants:matz2006-06-131-7/+0
| | | | | | | | | | | | | | | | | | | IPsocket, TCPsocket, SOCKSsocket, TCPserver, UDPsocket, UNIXsocket, UNIXserver. * eval.c (formal_assign): post splat arguments should have had higher priority than optional arguments, since they are mandatory. [ruby-dev:28715] * eval.c (VIS_MASK): broken. should be 15. [ruby-dev:28715] * io.c (argf_getc): should return one-character string. [ruby-dev:28715] * io.c (rb_io_readchar): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sock_s_unpack_sockaddr_in): rejectakr2006-06-051-0/+14
| | | | | | | | | non-AF_INET/AF_INET6 sockaddr. (sock_s_unpack_sockaddr_un): reject non-AF_UNIX sockaddr. [ruby-dev:28691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c: fix sockaddr_un handling.akr2006-06-041-25/+44
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2006-06-021-50/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a comment.akr2006-06-011-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (s_recvfrom): alen may be zero with UNIXSocketakr2006-06-011-61/+281
| | | | | | | | | | | | | | | too. (tested on NetBSD 3.0) (s_recvfrom_nonblock): extracted from sock_recvfrom_nonblock. (sock_recvfrom_nonblock): use s_recvfrom_nonblock. (ip_recvfrom_nonblock): new method: IPSocket#recvfrom_nonblock (unix_recvfrom_nonblock): new method: UNIXSocket#recvfrom_nonblock (s_accept_nonblock): extracted from sock_accept_nonblock. (sock_accept_nonblock): use s_accept_nonblock. (tcp_accept_nonblock): new method: TCPServer#accept_nonblock (unix_accept_nonblock): new method: UNIXServer#accept_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu2006-05-252-54/+36
| | | | | | | | | | | | | | | macros moved to extconf.h. * ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and EXTSTATIC permanent. * ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS. * {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added $(INCFLAGS). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update nonblocking methods document.akr2006-05-241-2/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add reason for accept(2) failure in accept_nonblock.akr2006-05-221-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update *_nonblock doc.akr2006-05-221-160/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rubyio.h (rb_io_set_nonblock): declared.akr2006-05-221-4/+361
| | | | | | | | | | | | | | | | | | * io.c (rb_io_set_nonblock): new function. (io_getpartial): nonblocking read support. (io_read_nonblock): new method: IO#read_nonblock. (io_write_nonblock): new method: IO#write_nonblock. * ext/socket/socket.c (s_accept): retry for EWOULDBLOCK. revert [ruby-talk:113807]. (sock_connect_nonblock): new method: Socket#connect_nonblock. (sock_accept_nonblock): new method: Socket#accept_nonblock. (sock_recvfrom_nonblock): new method: Socket#recvfrom_nonblock. [ruby-core:7917] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/.cvsignore: ignore callback.h.aamine2006-03-031-0/+1
| | | | | | | | * ext/ripper/.cvsignore: ignore eventids2table.c. * ext/socket/.cvsignore: ignore constants.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e