Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Blogging with VC++ Pin
_AnsHUMAN_ 27-Aug-06 22:37
_AnsHUMAN_ 27-Aug-06 22:37 
AnswerRe: Blogging with VC++ Pin
Zac Howland25-Aug-06 6:44
Zac Howland25-Aug-06 6:44 
GeneralRe: Blogging with VC++ Pin
_AnsHUMAN_ 27-Aug-06 22:36
_AnsHUMAN_ 27-Aug-06 22:36 
QuestionHow to create a new thread to init socket in DLL? Pin
teawater24-Aug-06 21:47
teawater24-Aug-06 21:47 
AnswerRe: How to create a new thread to init socket in DLL? Pin
teawater25-Aug-06 14:38
teawater25-Aug-06 14:38 
QuestionReceiveFrom(); [modified] Pin
ramanand_bulusu24-Aug-06 21:43
ramanand_bulusu24-Aug-06 21:43 
AnswerRe: ReceiveFrom(); Pin
uday kiran janaswamy24-Aug-06 23:42
uday kiran janaswamy24-Aug-06 23:42 
AnswerRe: ReceiveFrom(); Pin
uday kiran janaswamy24-Aug-06 23:43
uday kiran janaswamy24-Aug-06 23:43 
hi,


#include <stdio.h>
#include "winsock2.h"

void main() {

WSADATA wsaData;
SOCKET SendSocket;
sockaddr_in RecvAddr;
int Port = 27015;
char SendBuf[1024];
int BufLen = 1024;

//---------------------------------------------
// Initialize Winsock
WSAStartup(MAKEWORD(2,2), &wsaData);

//---------------------------------------------
// Create a socket for sending data
SendSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);

//---------------------------------------------
// Set up the RecvAddr structure with the IP address of
// the receiver (in this example case "123.456.789.1")
// and the specified port number.
RecvAddr.sin_family = AF_INET;
RecvAddr.sin_port = htons(Port);
RecvAddr.sin_addr.s_addr = inet_addr("123.456.789.1");

//---------------------------------------------
// Send a datagram to the receiver
printf("Sending a datagram to the receiver...\n");
sendto(SendSocket,
SendBuf,
BufLen,
0,
(SOCKADDR *) &RecvAddr,
sizeof(RecvAddr));

//---------------------------------------------
// When the application is finished sending, close the socket.
printf("Finished sending. Closing socket.\n");
closesocket(SendSocket);

//---------------------------------------------
// Clean up and quit.
printf("Exiting.\n");
WSACleanup();
return;
}



Uday kiran
AnswerRe: ReceiveFrom(); Pin
Hamid_RT25-Aug-06 0:56
Hamid_RT25-Aug-06 0:56 
QuestionRe: ReceiveFrom(); Pin
David Crow25-Aug-06 2:44
David Crow25-Aug-06 2:44 
Questionproblem in loading XML Pin
raycadarena24-Aug-06 21:13
raycadarena24-Aug-06 21:13 
QuestionNon Rectangular Edit Box Pin
kiranin24-Aug-06 20:57
kiranin24-Aug-06 20:57 
AnswerRe: Non Rectangular Edit Box Pin
toxcct24-Aug-06 21:53
toxcct24-Aug-06 21:53 
GeneralRe: Non Rectangular Edit Box Pin
kiranin24-Aug-06 22:07
kiranin24-Aug-06 22:07 
GeneralRe: Non Rectangular Edit Box Pin
Hamid_RT24-Aug-06 22:49
Hamid_RT24-Aug-06 22:49 
AnswerRe: Non Rectangular Edit Box Pin
Christian Graus24-Aug-06 22:22
protectorChristian Graus24-Aug-06 22:22 
AnswerRe: Non Rectangular Edit Box Pin
Waldermort24-Aug-06 22:42
Waldermort24-Aug-06 22:42 
QuestionEdit Control multiline - number of lines Pin
Joy Anne24-Aug-06 20:51
Joy Anne24-Aug-06 20:51 
AnswerRe: Edit Control multiline - number of lines Pin
_AnsHUMAN_ 24-Aug-06 22:03
_AnsHUMAN_ 24-Aug-06 22:03 
AnswerRe: Edit Control multiline - number of lines Pin
toxcct24-Aug-06 22:39
toxcct24-Aug-06 22:39 
GeneralRe: Edit Control multiline - number of lines Pin
David Crow25-Aug-06 2:49
David Crow25-Aug-06 2:49 
GeneralRe: Edit Control multiline - number of lines Pin
toxcct25-Aug-06 2:51
toxcct25-Aug-06 2:51 
Questionattaching icons to the menu options Pin
radhika2824-Aug-06 20:50
radhika2824-Aug-06 20:50 
AnswerRe: attaching icons to the menu options Pin
KarstenK24-Aug-06 22:56
mveKarstenK24-Aug-06 22:56 
AnswerRe: attaching icons to the menu options Pin
Hamid_RT25-Aug-06 1:38
Hamid_RT25-Aug-06 1:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.