I am working on a Winsock programme which should send data in a array, which contains 26 no of characters(a to z), to the connected remote socket in several attempts.
Condition is.... I only need send 4 characters per attempt to the remote socket. So it should reads first 4 characters from begin (1st character to 4th character ) of the array and send it to remote socket, then again next 4 characters (from 5th to 8th) and send it. This should needed to continue until the array get finish.
Ex:
if array[26]="abcdefghijklmnopqrstuvwxyz";
In the first attempt, it should send "abcd" to remote socket
In the second attempt, it should send "efgh" to remote socket and third "ijkl" etc,.
In the last attempt t should send "yz" (because no of characters are 26 if 26/4 = 6 and extra 2) to the remote socket.
I can write winsock code for initialize the socket [WSAStartup() function], create socket, bind it [bind() function] and connect to remote socket using connect() function.
I only need help from there to onward, reading 4 charactores from array[26] and send those using send() function according to the above described way.
Pls be king enough to help me for this...
Regards
thebrighter