Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- From: stephen park <steebu@xxxxxxxxx>
- Date: Wed, 12 May 2010 10:00:30 -0700 (PDT)
Wow, I really hate turning this into a .net discussion in an mfc
group, but I built a CLR console app and this just doesn't send
anything to the Newcomer server: (code in its entirety)
#include "stdafx.h"
using namespace System;
using namespace System::Net::Sockets;
int main(array<System::String ^> ^args)
{
TcpClient^ c = gcnew TcpClient( server,port );
String^ msg = "hello, world!";
array<Byte>^data = Text::Encoding::ASCII->GetBytes( msg );
c->Client->Send( data );
Console::ReadKey();
c->Close();
return 0;
}
The server says its connected, but when I hit a key the server says
?.?.?.? [?] Closed
with the "Last Received Message" edit box empty.
Doing the same thing with csocket and an mfc console app does the same
thing. Just what the heck am I missing in both?
.
- Follow-Ups:
- Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- From: Hector Santos
- Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- References:
- Newcomer's CAsyncSocket example: trouble connecting with other clients
- From: stephen park
- Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- From: Hector Santos
- Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- From: Hector Santos
- Newcomer's CAsyncSocket example: trouble connecting with other clients
- Prev by Date: Re: General Question: CString vs LPTSTR & LPCTSTR
- Next by Date: Re: CArray help
- Previous by thread: Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- Next by thread: Re: Newcomer's CAsyncSocket example: trouble connecting with other clients
- Index(es):
Relevant Pages
|