| 
									
										
										
										
											2014-04-22 03:29:49 -04:00
										 |  |  | USING: accessors alien.c-types io.encodings.utf8 kernel | 
					
						
							|  |  |  | sequences tools.test unix.ffi unix.utilities ;
 | 
					
						
							| 
									
										
										
										
											2013-09-16 08:45:11 -04:00
										 |  |  | IN: unix.ffi.tests | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ 80 ] [ "http" f getservbyname port>> ntohs ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-22 11:25:51 -04:00
										 |  |  | ! Aliases seem unreliable. Leave this as an example but don't rely | 
					
						
							|  |  |  | ! on aliases working. | 
					
						
							| 
									
										
										
										
											2014-04-22 11:27:13 -04:00
										 |  |  | [ ] [ | 
					
						
							| 
									
										
										
										
											2014-04-22 11:25:51 -04:00
										 |  |  |     "http" f getservbyname aliases>> utf8 alien>strings drop
 | 
					
						
							| 
									
										
										
										
											2013-09-16 08:45:11 -04:00
										 |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ "http" ] [ 80 htons f getservbyport name>> ] unit-test |