PDA

Click to See Complete Forum and Search --> : Connect window xp to linux(udp socket programming)


minlee
Mar 24th, 2009, 03:36 PM
Hi.

I'm new to vb6.

I want to transmit data between linux(C laguage) and window xp(vb6) with UDP socket.

I already used "winsock" in vb6, but data wasn't transmitted with linux server.

Do I need to make structure(sockaddr_in) in vb6 so that linux server can read it?

Or can I use this structure type without any declare in vb6?

Here's my VB6 code,


''''send data'''''''''''''''''''''''''''

Private Sub cmdSend_Click()
wsClient.SendData txtSend.Text
DisplayText "<Client> " & txtSend.Text
txtSend.Text = vbNullString
End Sub
.................
''''receive data'''''''''''''''''''''

Private Sub wsClient_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
wsClient.GetData strData, vbString
DisplayText "<Server> " & strData
End Sub
........



In order to receive/send data from/to this client(window, vb6),

how does Linux sever(C program) can do?

or

Does window client need to be change? How?

Please, it's urgent problem related with my research.

thanks.

Atheist
Mar 24th, 2009, 04:58 PM
It does not matter what OS is running on the host. Standard transport protocols are made to give a common language between hosts. Just send the data to the server using UDP just like you would send it to any other host.