���}���P��tcp���{�����Ć��}�� ����71336���Pע�^���� |
---|
Rite2009 |
1�� |
![]() |
�P��tcp���{�������}�� ![]()
����9260��һ��tcp���������͑���socket�B��ͨ�^ָ�����d�ҵ��ļ�������һ��OnRead()�Ļ��{�������Д�ָ��l�������ļ��������B�m�l�Ͷ����ļ��������һ���ļ�߀�]�аl���꣨Ҳ���ǻ��{����߀�ڈ��У�����һ���B���ց�����Ҫ��������{���������x�x�������֣��Ǻ�~~
������ǿ�����OnRead()���{��������ӑB����һ�����߶������̣��@Щ�����̌��T��ͬ���B�ӿ͑��˰l���ļ������Dz�ͬ���B�ӿ͑�����Ҫ���ļ�Ҳ��ͬ����֪����ô�������rָ�c~~~ |
�������� | ���� | �؏� ![]() |
zhl |
2�� |
![]() |
![]()
���htcp����������ͬ�r֧�ֶ����B�ӣ�ÿ����һ���B�Ӿ͆���һ��������Ҳ����ÿ���B�Ӷ���һ�������ľ������@�ӱ��ڔ�����̎�������w���ԅ����҂��ṩ��step3_tcptest�����P���a��
|
�������� | ���� | �؏� ![]() |
Rite2009 |
3�� |
![]() |
![]()
�ҬF�ھ����õ�step3�е����������������ҵ��ļ��l�ͳ����ڻ��{����OnRead()������ʹ���ж�������������ͬ��朽�������OnRead����̎����������ֻ��һ��ô��
|
�������� | ���� | �؏� ![]() |
Rite2009 |
4�� |
![]() |
![]()
����hHandle = CreateThread()����һ����������ԓ���̺��������ꮅ���˳������Ԅ��P�]ԓ����ô��߀��ҪCloseHandle(hHandle)ô��
|
�������� | ���� | �؏� ![]() |
Rite2009 |
5�� |
![]() |
![]()
Ŷ�����������e�˵Ľ�ጣ�
----------------------------------------------------- 1�����̺;��̾����Handle������һ���|������������cpu���\�е�.....���f������ˣ������̾����һ���Ⱥˌ������҂�����ͨ�^������������������Ǿ��̵��������ں;��̾�����������ڲ�һ�ӵ������̵��������ھ��Ǿ��̺������_ʼ���е�return�����̾�������������Ǐ�CreateThread���ص���CloseHandle()�� 2�����еăȺˌ���������Handle������ϵ�y�YԴ������Ҫ߀����Ҳ�����f�����һ��Ҫclosehandle�P�]֮��������@ô������ϵ�y�ľ���YԴ�ܿ���ù��ˡ� 3�������CreateThread�Ժ���Ҫ���@��������һЩ�����������׃���ȼ������������̵ȴ�������TermateThread������Ҫ�����@�������ʹ��������CloseHandle��������_��һ�����̣�������Ҫ�����M����θ��A��CreateThread��ֱ��CloseHandle�����ˡ� ���� CloseHandel(ThreadHandle ); ֻ���P�]��һ�����̾����������ʾ�Ҳ���ʹ��ԓ������������@����������ľ������κθ��A�������]�нY�������� |
�������� | ���� | �؏� ![]() |
x10 |
6�� |
![]() |
![]()
�x�x�����P��Handle��������:-)
|
�������� | ���� | �؏� ![]() |