Simple WINSOCK Problem 
Author Message
 Simple WINSOCK Problem

I have a winsock control in a VB6 app (needs to be VB6 for right now).
I am trying to connect it to a C# app.

When I try to send data nothing appears to be sent, although a connection is
initated.

WITH wsckControl
    .RemoteHost = "localhost"
    .RemotePort = "44444"
    .Connect
    Wait .1        ' need to wait because Connect is asynchronous
    .SendData "Test String"
    .Close
END With

If i do
telnet localhost 44444
i can type and my server recognizes the characters
i always get an empty stream with the above vb.

???



Sun, 03 Oct 2004 08:56:27 GMT  
 Simple WINSOCK Problem
This is a vb.net group.

You don't need to do winsock, you would use the tcpClient and NetworkStream

Once you Write, you would read the result back with .Read.

Check the sdk for samples.

--
Joe Feser
Fesersoft
http://www.fesersoft.com/
.Net, XML, XSLT, SQL
Free Code, Articles and Information.


Quote:
> I have a winsock control in a VB6 app (needs to be VB6 for right now).
> I am trying to connect it to a C# app.

> When I try to send data nothing appears to be sent, although a connection
is
> initated.

> WITH wsckControl
>     .RemoteHost = "localhost"
>     .RemotePort = "44444"
>     .Connect
>     Wait .1        ' need to wait because Connect is asynchronous
>     .SendData "Test String"
>     .Close
> END With

> If i do
> telnet localhost 44444
> i can type and my server recognizes the characters
> i always get an empty stream with the above vb.

> ???



Sun, 03 Oct 2004 09:08:07 GMT  
 Simple WINSOCK Problem
unfortunately for right now we have to still use VB6. i figured that nearly
all the programmers on
here have used VB6 so thats why I asked :)

i'm sure its something simple, unfortunately tcpClient (which I am using in
the c# side) cant be
used with vb6 :(


Quote:
> This is a vb.net group.

> You don't need to do winsock, you would use the tcpClient and
NetworkStream

> Once you Write, you would read the result back with .Read.

> Check the sdk for samples.

> --
> Joe Feser
> Fesersoft
> http://www.fesersoft.com/
> .Net, XML, XSLT, SQL
> Free Code, Articles and Information.



> > I have a winsock control in a VB6 app (needs to be VB6 for right now).
> > I am trying to connect it to a C# app.

> > When I try to send data nothing appears to be sent, although a
connection
> is
> > initated.

> > WITH wsckControl
> >     .RemoteHost = "localhost"
> >     .RemotePort = "44444"
> >     .Connect
> >     Wait .1        ' need to wait because Connect is asynchronous
> >     .SendData "Test String"
> >     .Close
> > END With

> > If i do
> > telnet localhost 44444
> > i can type and my server recognizes the characters
> > i always get an empty stream with the above vb.

> > ???



Sun, 03 Oct 2004 15:37:36 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Simple Winsock Problem

2. Simple Winsock Problem

3. Simple Winsock Problem

4. A simple Mail problem in search for a equally simple answer

5. winsock problem sending large strings (winsock.senddata)

6. Simple question about Winsock?

7. simple chat winsock+wscript.run(rundll)

8. Simple Catalyst Winsock query

9. oe simple help whit winsock

10. Simple Winsock question

11. help! simple chat with winsock

12. Help Using Winsock as a simple Web Server......

 

 
Powered by phpBB® Forum Software