Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

How to send and receive internet messages using socket?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kueishiong Tu - 10 May 2004 10:06 GMT
How do I send and receive internet messages using socket in the .net VC++ environment?
Coding sample will be helpful.
andrea catto' - 10 May 2004 17:19 GMT
it's complex,
you need to have an application that 'listens' and another that 'sends'.
in most cases you'd be speaking of the 'server' and the 'client'
respecvively.
in most cases you'd involve, not always but mostly, multi threading.

the code is too big to attach and protected by an NDA, ouch....
so all I can tell you is...
client and server must initialize the socket system with
WSAStartup(&mystruct);
the server needs to grab a socket(), listen() and accept().
accept() will wait until a new client connection has come...
the client will simply connect()....

when these two codes are made and running....
it's up to you, you can send anything you want, but remember in sockets you
can not send packets bigger than X size, defined using the ioctl() function,
generally in windows a maximum packet size if 8K, but use some code to see
this dynamically.

> How do I send and receive internet messages using socket in the .net VC++ environment?
> Coding sample will be helpful.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.