Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #16855

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail
From "Steven Simpson" <steven.simpson@1:261/38.remove-x1c-this>
Subject Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type.
Message-ID <50182C7D.55823.calajapr@time.synchro.net> (permalink)
X-Comment-To Greg
Newsgroups comp.lang.java.programmer
X-FTN-AREA COMP.LANG.JAVA.PROGRAMMER
X-FTN-MSGID 1:261/38 93e94d89
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98]
Lines 39
Date Tue, 31 Jul 2012 20:07:01 GMT
NNTP-Posting-Host 69.21.70.65
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1343765221 69.21.70.65 (Tue, 31 Jul 2012 15:07:01 CDT)
NNTP-Posting-Date Tue, 31 Jul 2012 15:07:01 CDT
Organization tds.net
Xref csiph.com comp.lang.java.programmer:16855

Show key headers only | View raw


  To: Greg
From: "Steven Simpson" <steven.simpson@1:261/38.remove-dpk-this>

  To: Greg
From: "Steven Simpson" <steven.simpson@1:261/38.remove-rf4-this>

  To: Greg
From: Steven Simpson <ss@domain.invalid>

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

-+- 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

--- 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

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

Re: IllegalArgumentException with Socket API and Proxy with Proxy.Type. "Steven Simpson" <steven.simpson@1:261/38.remove-x1c-this> - 2012-07-31 20:07 +0000

csiph-web