|
Re: socket code in groovy: msg#00103lang.groovy.user
Hello, Did you try flushing the reader and writer streams? -- Guillaume Laforge http://glaforge.free.fr/weblog 노재현 wrote: > Hi, there > > I stumpled in the below code ^^ > > I use a socket class in java and connect to my localhost…. But it > doesn’t work… > > No accesslog in webserver’s acesss log, stdout logfile… > > > > Also the code in the below doesn’t generate any exception… just execute > well… > > Anyone know about this phenomenon? > > > > Thanks in advance… ^^ > > > > #!/usr/bin/env groovy > > > > import java.io.* > > import java.net.* > > > > socket = new Socket("127.0.0.1", 80) > > > > reader = new BufferedReader(new InputStreamReader(socket.getInputStream())) > > writer = new PrintWriter(socket.getOutputStream()) > > > > writer << "GET /info.html HTTP/1.0" > > > > socket.close() >
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | socket code in groovy, 노재현 |
|---|---|
| Next by Date: | Generating XML with namespace?, Michael Schuerig |
| Previous by Thread: | socket code in groovy, 노재현 |
| Next by Thread: | Generating XML with namespace?, Michael Schuerig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |