hi guys...
can you please help me with this.
am currently doing a client-server program...a tcp port scanning.
actually am doing great with this work...but i got stuck with this part...
int rd;
void sendMessage(char ........end, char *host, int port)
{
while(1)
{
rd = sendto(sd,ssend,strlen(ssend)+1,0,(struct sockaddr *) &servAddr,sizeof(servAddr));
if(rd<0) {
printf("cannot send data \n");
exit(1);
}
printf("%s:%i:%s\n",host,port,ssend );
break;
}
---the problem with this, im supposed to combine the char* host, char ........end and the int port in a one long char* ssend (or string) for me to send it in the sendto function. is there anyway for me to concatenate the char* ssend, the char* host and the int port (this is my problem) in a long string? or how do you convert an int to a string so that i can use the strcat function? thanks...