Wednesday, February 17, 2010

Thank you

Hi,

I just wanted to say thank you for providing this website. It has really helped me in my current projects that I’m working on. Very clear examples and concise code. Thank you.

Justin Robinson


Friday, February 5, 2010

Thank you

Thanks a lot for your Winsock Examples!

They helped me a lot! :-)

Yours,
Sauer.

Tuesday, January 19, 2010

Hi,
I am writing this as a feedback due to an error in the code posted in your website. The part called Creating Protocols Header Definition Class (C#) Part a. This part has a class called SockaddrConvert. Find the code below as it appears on your website:

class SockaddrConvert {
///
/// This routine converts an IPEndPoint into a byte array that represents the
/// underlying sockaddr structure of the correct type. Currently this routine
/// supports only IPv4 and IPv6 socket address structures.
///

/// IPEndPoint to convert to a binary form
/// Binary array of the serialized socket address structure

static public byte[] GetSockaddrBytes(IPEndPoint endPoint)
{
SocketAddress socketAddrermal" style="text-autospace:none"> unpackedPort = BitConverter.ToUInt16(sockaddrBytes, 2);

Array.Copy(sockaddrBytes, 8, addressBytes, 0, 16);
unpackedAddress = new IPAddress(addressBytes);
unpackedEndpoint = new IPEndPoint(unpackedAddress, unpackedPort);
}
else
{
Console.WriteLine("GetEndPoint: Unknown address family: {0}", addressFamily);
}

return unpackedEndpoint;
}
}


Fatos Peci

------------------------------------------------
Thank you very much. The error happened when uploading the file. Please find the original source code in the Download page. It looks like the webmaster has corrected the error.
Take note that all those code examples just for learning, it is not for any 'production'. All are 'loose' codes, used in one of the class taught by one of the instructors. The following is the correct one.

Saturday, August 22, 2009

Hi tenouk Creator,

http://www.tenouk.com/ is the best site for programmers all around the globe.

Today I found this site.. Very very helpful... Thank you and your team
for doing all the good work..

Content of site is one of the best. If possible we can make the webpages
much better. Similar to cpluscodesnippetnew forum.

Please keep in touch , let me know if i can be of any help.

Thanks
xxxxxxxxx

--
"Programmers never die,they just get lost in processing"

Tuesday, June 30, 2009

Hi,

I detected an error in www.tenouk.com/Winsock/Winsock2example7.html.

with the gethostbyname() and gethostbyaddr() Program Example

it should add

#include ctype.h (put the less than and greater than sign as usual)

at the first of all, doesn't it?

otherwise the compiler will report isalpha function doesn't declared.


Regards.

Saturday, May 16, 2009

Hello,

thank you for providing the winsock tutorials!
Verbose and easy to understand!

When experimenting with the overlapped model sample,
(http://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancediomethod5e.html)
an invalid parameter error occured with WSAWaitForMultipleEvents:
DWORD WINAPI ProcessIO(LPVOID lpParameter)
{
.....
if ((Index = WSAWaitForMultipleEvents(EventTotal, EventArray, FALSE,
WSA_INFINITE, FALSE)) == WSA_WAIT_FAILED)

The invalid parameter was EventTotal == 0, and not == 1 as expected.
To fix the bug you must set EventTotal = 1 *before* you create the
thread for ProcessIO:


if ((EventArray[0] = WSACreateEvent()) == WSA_INVALID_EVENT)

{

printf("WSACreateEvent() failed with error %d\n", WSAGetLastError());

return 1;

}

else

printf("WSACreateEvent() is OK!\n");

////////// ==> fix: set EventTotal = 1 here:
EventTotal = 1;


// Create a thread to service overlapped requests

if (CreateThread(NULL, 0, ProcessIO, NULL, 0, &ThreadId) == NULL)

{

printf("CreateThread() failed with error %d\n", GetLastError());

return 1;

}

else

printf("Nothing to say, CreateThread() is OK!\n");


////////// ==> too late here, ProcessIO() could run already:
// EventTotal = 1;

Thursday, April 16, 2009

Start, the intro

Please use this place to say something, comment (good or bad) and anything else related to tenouk.com. This blog is alternatively monitored by contributors to tenouk.com. TQ.