1. winsocks

rehi all,

I am trying to write some code to talk to other apps on my puter using
socks, and using winsock.ew , but something isn't working how i expect, and
i don't know why. This is the first time i have used the win api even
indirectly, other than dialogs and sock ports in mirc.


errorRtn = WsockInit()
gives me 0 .

errorRtn = WsockSendData(socknum, data)
gives me a -1 . What is that?

Also, how does winsock.ew know i want a tcp or a udp connect on socknum? Or
that it is to keep data recieved on that port until i come read it?

Kat

new topic     » topic index » view message » categorize

2. Re: winsocks

Kat wrote:
>
> rehi all,
>
> I am trying to write some code to talk to other apps on my puter using
> socks, and using winsock.ew , but something isn't working how i expect, and
> i don't know why. This is the first time i have used the win api even
> indirectly, other than dialogs and sock ports in mirc.
>
> errorRtn = WsockInit()
> gives me 0 .

Correct.  You need

errorRtn = WsockCallSocket(server, socknum)

Before you do anything though (you probably have it, but you didn't say so I
thought I'd mention it...)

> errorRtn = WsockSendData(socknum, data)
> gives me a -1 . What is that?

I'm having the same problem.  If you do a trace, the comments in Winsock.ew
describe this as The socket being Fubar'ed (Fowled up beyond all recognition)
really bad.  No idea what causes it.

> Also, how does winsock.ew know i want a tcp or a udp connect on socknum? Or
> that it is to keep data recieved on that port until i come read it?

[Shrugs...]

> Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu