• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to read and write to/from webserver socket?

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

How do I modify http://pleac.sourceforge.net/pleac_groovy/sockets.html#AEN925 to print out what the browser sends it?

Here is my attempt:


I get this error:

Exception thrown: Address already in use: JVM_Bind

java.net.BindException: Address already in use: JVM_Bind

at ConsoleScript3.run(ConsoleScript3:1)

Thanks,
Siegfried
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error is unrelated to what you're asking--there's something already using that socket.

Perhaps your own app, since it never exits.
 
Siegfried Heintze
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I comment out that one line where I try to read the socket, I basically have the original that works. This leads me to believe my attempt to read is causing the problem.

So, how do I take the original and enhance it to display all the post parameters and the header that the browser is sending it?
Thanks,
Siegfried
 
reply
    Bookmark Topic Watch Topic
  • New Topic