News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Chat in mode consola

Started by Richard, May 25, 2005, 05:15:22 AM

Previous topic - Next topic

Richard

Thank  :U

I am studying  winsock32 and socketĀ“s.

Richard

thanks for the help, but now we need something
in console we are capturing something to send to the server, but when the program capture something, it send "@:"
the capture is in the line 149 of client.asm
in the zip ared the client and the server.

Thanks for all

[attachment deleted by admin]

Tedd

You're getting confused when using ADDR :P
txtinput does not want ADDR :wink

siguenv:   

    .
    .
    invoke send,[s2],ADDR txtinput,SIZEOF txtinput,0


should be...

    invoke lstrlen, txtinput
    invoke send,[s2],txtinput,eax,0


Remember txtinput IS the address, so 'ADDR txtinput' means "the address of the address of the text"
This also means SIZEOF will not work - you need to see how long the string is (lstrlen)


There is a small 'error' in the server when it receives messages, but I'll leave you to work that one out :U
No snowflake in an avalanche feels responsible.

Richard

Tedd, thank you very much :U

Richard.

Richard

How clear the buffer when recive? :(

EXAMPLE

rec:Hello World
rec:whereWorld
rec:byere World


Tedd

 :bdg You found that bug :U

After the server does recv, you need to add 0 (zero) to the end of the string.


invoke recv .........
lea ecx,[recvBuff]
mov BYTE PTR [eax+ecx],0



But check if recv returned SOCKET_ERROR first :wink
No snowflake in an avalanche feels responsible.

Richard

Ok Tedd, thank. :U

Richard.