[Pkg] The Trunk: Network-bf.157.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Dec 8 00:58:09 UTC 2014

Bert Freudenberg uploaded a new version of Network to project The Trunk:

==================== 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') -----
  	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 
  	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: '') port: 80.
  foo waitForConnectionUntil: (Socket standardDeadline).
  options := {
  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: '') 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') -----
  	self nextPutAll: String cr!

Item was changed:
  ----- Method: SocketStream>>crlf (in category 'stream out') -----
  	self nextPutAll: String crlf!

Item was changed:
  ----- Method: SocketStream>>isBinary (in category 'testing') -----

Item was changed:
  ----- Method: SocketStream>>nextLine (in category 'stream in') -----
  	^self nextLineCrLf!

Item was changed:
  ----- Method: SocketStream>>nextLineLf (in category 'stream in') -----
  	| nextLine |
  	nextLine := self upToAll: String lf.

Item was changed:
  ----- Method: SocketStream>>shouldTimeout (in category 'testing') -----
  	^self timeout > 0!

Item was changed:
  ----- Method: SocketStream>>socket (in category 'configuration') -----

Item was changed:
  ----- Method: SocketStream>>socket: (in category 'configuration') -----
  socket: aSocket
  	socket := aSocket!

Item was changed:
  ----- Method: SocketStream>>space (in category 'stream out') -----
  	self nextPut: Character space!

Item was changed:
  ----- Method: String>>asUrl (in category '*network-url') -----
  	"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!

More information about the Packages mailing list