Hi all,
The vb client is successfull in connecting to the server and also sending the data.. I am not getting any error/exception there.the server is not able to receive any data .Only after I close the vb client Application the message sent by the client is seen on the server side..
Please help me in this regards..
thanks in advance
Ravi
Yeh i will write more detail about my code..
We had first designed first the server in java.and the client also in java..As the UI for client doen'nt look nice in Java i shifted to do VB client..
I am using the Winsock control..( VB6 )
I am doing the
winsock.connect
then checking whether the socket is in the sckConnected state or not
If client socket is in the connected state
Then i am sending the data.
The server needs to receive this data(username and password)
Server authenticates the user and send back a string as Authenticcated.
The VB Client needs to receive this data so
IN Vb Client i call the winsock.GetData..
But problem is i am not seeing any message in Java server side
and no message is being sent by server to Vb Client..
But when I close the VB Application..The message on the server side is seen ie.,
the user name and password that Vb client had sent..
pls guide me in this regard
I am attaching the code also
Dim strdata As String
Dim index As Integer
Static intClick As Integer
Dim intClickNumber As Integer
Dim dblEndTime As Double
If frmclient.optconfig = False Then
MsgBox "Enter the Server Name and Port Number in Configure Tab", vbOKOnly, "HostConfigure"
frmlogin.Hide
Exit Sub
End If
If txthostid = "" Or txtpassword = "" Then
MsgBox "Enter the HostId and Password ", vbOKOnly, "HostLogin"
Exit Sub
End If
MsgBox frmclient.tcpclient.State
If frmclient.tcpclient.State <> sckConnected Then
frmclient.tcpclient.Connect
End If
' Each time the button is clicked,
' give it a unique number.
intClick = intClick + 1
intClickNumber = intClick
' Wait for ten seconds.
dblEndTime = Timer + 10#
Do While dblEndTime > Timer
' Do nothing but allow other
' applications to process
' their events.
cmdok.Enabled = False
cmdcancel.Enabled = False
DoEvents
Loop
cmdok.Enabled = True
cmdcancel.Enabled = True
MsgBox frmclient.tcpclient.State
If frmclient.tcpclient.State = sckError Then
MsgBox "Server not ready", vbOKOnly, "TCPError"
Exit Sub
End If
If frmclient.tcpclient.State <> sckConnected Then
MsgBox "Client not connected to Server", vbOKOnly, "TCPError"
Exit Sub
End If
frmclient.tcpclient.SendData ("host3" + "$" + "host3")
frmclient.tcpclient.GetData strdata
txtoutput.Text = strdata
MsgBox strdata
frmlogin.Hide
waiting for ur reply sir,
thanks
Ravi