Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.

Discussion in 'Java' started by Steven Simpson, Jul 30, 2012.

  1. To: Greg
    From: Steven Simpson <>

    On 26/07/12 18:00, Greg wrote:
    > I am trying to create a socket with the proxy type of HTTP. Every time the

    socket is created an IllegalArgumentException is thrown. I have learned from
    googling that the HTTP proxy is unsupported in sockets. What is the work
    around?

    How much does the code using the Socket depend on its 'interface'? Perhaps it
    would be happy with (say) just getInputStream() and getOutputStream() on an
    already connected Socket. If so, then perhaps you can connect to the proxy
    explicitly, send "CONNECT" yourself, and parse the response header. If all
    goes okay, hand the socket as is over to the 'using' code, and it won't know
    the difference.

    --
    ss at comp dot lancs dot ac dot uk

    --- BBBS/Li6 v4.10 Dada-1
    * Origin: Prism bbs (1:261/38)
    --- Synchronet 3.16a-Win32 NewsLink 1.98
    Time Warp of the Future BBS - telnet://time.synchro.net:24
    Steven Simpson, Jul 30, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg
    Replies:
    4
    Views:
    307
    Steven Simpson
    Aug 16, 2012
  2. Knute Johnson
    Replies:
    0
    Views:
    201
    Knute Johnson
    Jul 29, 2012
  3. Knute Johnson
    Replies:
    0
    Views:
    170
    Knute Johnson
    Jul 29, 2012
  4. Knute Johnson
    Replies:
    0
    Views:
    146
    Knute Johnson
    Jul 30, 2012
  5. Knute Johnson
    Replies:
    0
    Views:
    153
    Knute Johnson
    Jul 31, 2012
Loading...

Share This Page