mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									8283be280c
								
							
						
					
					
						commit
						ca4397ad2c
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -142,6 +142,14 @@ rsock_socketpair(int domain, int type, int protocol, int sv[2])
 | 
			
		|||
 * _protocol_ should be a protocol defined in the domain,
 | 
			
		||||
 * defaults to 0 for the domain.
 | 
			
		||||
 *
 | 
			
		||||
 *   s1, s2 = Socket.pair(:UNIX, :STREAM, 0)
 | 
			
		||||
 *   s1.send "a", 0
 | 
			
		||||
 *   s1.send "b", 0
 | 
			
		||||
 *   s1.close
 | 
			
		||||
 *   p s2.recv(10) #=> "ab"
 | 
			
		||||
 *   p s2.recv(10) #=> ""
 | 
			
		||||
 *   p s2.recv(10) #=> ""
 | 
			
		||||
 *
 | 
			
		||||
 *   s1, s2 = Socket.pair(:UNIX, :DGRAM, 0)
 | 
			
		||||
 *   s1.send "a", 0
 | 
			
		||||
 *   s1.send "b", 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue