Click here to Skip to main content
16,004,974 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Checkbox make read only Pin
Marcus J. Smith4-Oct-05 4:57
professionalMarcus J. Smith4-Oct-05 4:57 
GeneralRe: Checkbox make read only Pin
shawndeprey8-Feb-10 10:39
shawndeprey8-Feb-10 10:39 
QuestionChecked List Box Pin
nitin_ion4-Oct-05 0:25
nitin_ion4-Oct-05 0:25 
AnswerRe: Checked List Box Pin
_mubashir4-Oct-05 1:07
_mubashir4-Oct-05 1:07 
GeneralRe: Checked List Box Pin
nitin_ion4-Oct-05 1:19
nitin_ion4-Oct-05 1:19 
GeneralRe: Checked List Box Pin
_mubashir4-Oct-05 2:03
_mubashir4-Oct-05 2:03 
QuestionAssign DataView with DataTable very slow Pin
thebread3-Oct-05 23:56
thebread3-Oct-05 23:56 
QuestionHelp me with TCP Communication for Proxy purpose Pin
Aboozar3-Oct-05 23:08
Aboozar3-Oct-05 23:08 
I am writing a software to be installed on the client computer and listens to a port number then by setting the proper config in IE , all the requests from the browser will be redirected to this application and after that the application will redirect the request to a proxy server. Please sont ask "why the browser doesn't directly conect to the proxy server?" because I have my reasons.

I am using TcpListener,Socket and TCPClient objects.
the Socket object is responsible to exchange data between the browser and application using the TcpListener and will be closed after the complete proccess.
the TCPClient object is responsible to transfer the Socket requests to proxy server and to redirect the proxy server responses to the Socket. It is so easy.

But some bad things happends and I dont know why D'Oh! | :doh:
running the application and debuging the application will represent different way of doing the job. for example in following code :

<br />
.<br />
.<br />
.<br />
1 Dim Counter2 As Integer<br />
2             Do<br />
3                 Dim hBuffer As Byte() = New Byte(tcpc.ReceiveBufferSize - 1) {}<br />
4 <br />
5                 'Get response of previously sent data from the proxy server<br />
6                 'I also used tcpc.getstream and got the same result<br />
7                 'tcpc as TCPClient<br />
8                 'ofcourse TCPClient doesnt have Socket object for public I used my own<br />
9                'class witch was drived from TCPClient<br />
10<br />
11                Counter2 = tcpc.theSocket.Receive(hBuffer, 0, hBuffer.Length, SocketFlags.None)<br />
12<br />
13                'Trim the buffer to omit the null area<br />
14                TrimBuffer(hBuffer, Counter2)<br />
15<br />
16                'If there is some data then send it to the browser<br />
17                If Counter2 > 0 Then<br />
18                    'Sending the data got from proxy server to browser<br />
19                    S.Send(hBuffer, 0, hBuffer.Length, SocketFlags.None)<br />
20                End If<br />
21<br />
22                'If the was some data go get more<br />
23            Loop While Counter2 > 0<br />
.<br />
.<br />
.


at line 11 some times it will stop responsing and the expected thing is responsing 0 for terminating the proccess.
also at line 10 some times it says that the TCPClient connection is lost and I never asked to close the cnnection also it is not good to open a TCPClient for each request.

please help me and give some tips if possible.
My mind is gona be dead soooooooon !

Aboo
Questionexcel data to grid Pin
maximumoverride3-Oct-05 22:06
maximumoverride3-Oct-05 22:06 
AnswerRe: excel data to grid Pin
_mubashir, _mubashir3-Oct-05 23:37
suss_mubashir, _mubashir3-Oct-05 23:37 
GeneralRe: excel data to grid Pin
maximumoverride4-Oct-05 15:27
maximumoverride4-Oct-05 15:27 
GeneralRe: excel data to grid Pin
_mubashir5-Oct-05 23:16
_mubashir5-Oct-05 23:16 
GeneralRe: excel data to grid Pin
maximumoverride6-Oct-05 19:05
maximumoverride6-Oct-05 19:05 
QuestionMS-Word and Terminal Server through VB 6.0 Pin
Anonymous3-Oct-05 21:51
Anonymous3-Oct-05 21:51 
AnswerRe: MS-Word and Terminal Server through VB 6.0 Pin
jonathan154-Oct-05 2:13
jonathan154-Oct-05 2:13 
Questionpassing arrays as function argument Pin
se.srikanth3-Oct-05 19:10
se.srikanth3-Oct-05 19:10 
QuestionDesigning a filmstrip? Pin
watagal3-Oct-05 13:44
watagal3-Oct-05 13:44 
QuestionOwner draw Pin
Saeid Jorablo3-Oct-05 12:13
Saeid Jorablo3-Oct-05 12:13 
QuestionPLEASE HELP ME Pin
Anonymous3-Oct-05 9:28
Anonymous3-Oct-05 9:28 
AnswerRe: PLEASE HELP ME Pin
Member 21943073-Oct-05 11:03
Member 21943073-Oct-05 11:03 
GeneralRe: PLEASE HELP ME Pin
Anonymous3-Oct-05 23:35
Anonymous3-Oct-05 23:35 
GeneralRe: PLEASE HELP ME Pin
satcomengineer4-Oct-05 1:14
satcomengineer4-Oct-05 1:14 
QuestionLabels and Mouse Pin
No-e3-Oct-05 8:58
No-e3-Oct-05 8:58 
AnswerRe: Labels and Mouse Pin
Richard_Wolf3-Oct-05 9:52
Richard_Wolf3-Oct-05 9:52 
GeneralRe: Labels and Mouse Pin
No-e3-Oct-05 9:58
No-e3-Oct-05 9:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.