Bert Freudenberg uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bf.157.mcz ==================== Summary ==================== Name: Network-bf.157 Author: bf Time: 8 December 2014, 1:57:48.396 am UUID: f8529b69-72e6-4dec-bd3c-408fecda17eb Ancestors: Network-cmm.156 Restore timestamps lost in assignment conversion. =============== Diff against Network-cmm.156 =============== Item was changed: ----- Method: FileStream class>>httpPostDocument:args: (in category '*network') ----- httpPostDocument: url args: argsDict | argString | argString := argsDict ifNotNil: [argString := HTTPSocket argString: argsDict] ifNil: ['']. ^self post: argString url: url , argString ifError: [self halt]! Item was changed: ----- Method: FileStream class>>requestURL:target: (in category '*network') ----- requestURL: url target: target "FileStream requestURL:'http://isgwww.cs.uni-magdeburg.de/~raab' target: ':=blank' " ^self concreteStream new requestURL: url target: target! Item was changed: ----- Method: ProtocolClient>>ensureConnection (in category 'private') ----- ensureConnection self isConnected ifTrue: [^self]. self stream ifNotNil: [self stream close]. self stream: (SocketStream openConnectionToHost: self host port: self port). self checkResponse. self login! Item was changed: ----- Method: Socket>>getOption: (in category 'other') ----- getOption: aName "Get options on this socket, see Unix man pages for values for sockets, IP, TCP, UDP. IE SO_KEEPALIVE returns an array, element one is an status number (0 ok, -1 read only option) element two is the resulting of the requested option" (socketHandle == nil or: [self isValid not]) ifTrue: [InvalidSocketStatusException signal: 'Socket status must valid before getting an option']. ^self primSocket: socketHandle getOption: aName "| foo options | Socket initializeNetwork. foo := Socket newTCP. foo connectTo: (NetNameResolver addressFromString: '192.168.1.1') port: 80. foo waitForConnectionUntil: (Socket standardDeadline). options := { 'SO_DEBUG'. 'SO_REUSEADDR'. 'SO_REUSEPORT'. 'SO_DONTROUTE'. 'SO_BROADCAST'. 'SO_SNDBUF'. 'SO_RCVBUF'. 'SO_KEEPALIVE'. 'SO_OOBINLINE'. 'SO_PRIORITY'. 'SO_LINGER'. 'SO_RCVLOWAT'. 'SO_SNDLOWAT'. 'IP_TTL'. 'IP_HDRINCL'. 'IP_RCVOPTS'. 'IP_RCVDSTADDR'. 'IP_MULTICAST_IF'. 'IP_MULTICAST_TTL'. 'IP_MULTICAST_LOOP'. 'UDP_CHECKSUM'. 'TCP_MAXSEG'. 'TCP_NODELAY'. 'TCP_ABORT_THRESHOLD'. 'TCP_CONN_NOTIFY_THRESHOLD'. 'TCP_CONN_ABORT_THRESHOLD'. 'TCP_NOTIFY_THRESHOLD'. 'TCP_URGENT_PTR_TYPE'}. 1 to: options size do: [:i | | fum | fum :=foo getOption: (options at: i). Transcript show: (options at: i),fum printString;cr]. foo := Socket newUDP. foo setPeer: (NetNameResolver addressFromString: '192.168.1.9') port: 7. foo waitForConnectionUntil: (Socket standardDeadline). 1 to: options size do: [:i | | fum | fum :=foo getOption: (options at: i). Transcript show: (options at: i),fum printString;cr]. "! Item was changed: ----- Method: SocketStream class>>openConnectionToHost:port: (in category 'instance creation') ----- openConnectionToHost: hostIP port: portNumber | socket | socket := Socket new. socket connectTo: hostIP port: portNumber. ^self on: socket! Item was changed: ----- Method: SocketStream>>cr (in category 'stream out') ----- cr self nextPutAll: String cr! Item was changed: ----- Method: SocketStream>>crlf (in category 'stream out') ----- crlf self nextPutAll: String crlf! Item was changed: ----- Method: SocketStream>>isBinary (in category 'testing') ----- isBinary ^binary! Item was changed: ----- Method: SocketStream>>nextLine (in category 'stream in') ----- nextLine ^self nextLineCrLf! Item was changed: ----- Method: SocketStream>>nextLineLf (in category 'stream in') ----- nextLineLf | nextLine | nextLine := self upToAll: String lf. ^nextLine! Item was changed: ----- Method: SocketStream>>shouldTimeout (in category 'testing') ----- shouldTimeout ^self timeout > 0! Item was changed: ----- Method: SocketStream>>socket (in category 'configuration') ----- socket ^socket! Item was changed: ----- Method: SocketStream>>socket: (in category 'configuration') ----- socket: aSocket socket := aSocket! Item was changed: ----- Method: SocketStream>>space (in category 'stream out') ----- space self nextPut: Character space! Item was changed: ----- Method: String>>asUrl (in category '*network-url') ----- asUrl "convert to a Url" "'http://www.cc.gatech.edu/' asUrl" "msw://chaos.resnet.gatech.edu:9000/' asUrl" ^Url absoluteFromText: self! Item was changed: ----- Method: String>>asUrlRelativeTo: (in category '*network-url') ----- asUrlRelativeTo: aUrl ^aUrl newFromRelativeText: self! |
Free forum by Nabble | Edit this page |