🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.program
1 messages
1 total messages Started by high Tue, 12 Oct 1999 00:00
ipx�������
#262
Author: high
Date: Tue, 12 Oct 1999 00:00
34 lines
1284 bytes
�����һ��IPX/SPX�ļ�ͨ�³���
the source code as follows:

#include "winsock2.h"
#include "wsipx.h"

............
void Init()
{
 WORD wVersionRequested;
 WSADATA wsaData;
 wVersionRequested = MAKEWORD(2, 0);
 if(WSAStartup(wVersionRequested, &wsaData) == SOCKET_ERROR)
 {
    return ;
 }
 SOCKET SrvSock = socket(AF_IPX,     // IPX Family
                     SOCK_DGRAM,     // Gives message mode transfers
                     NSPROTO_IPX);   // SPX is connection oriented
                                          transport

 if(SrvSock==INVALID_SOCKET) {
                AfxMessageBox("error");
                return;
        }
}

.......
WSAStartup()�ɹ�����
���ҵ���socket����(����),���Ƿ���INVALID_SOCKET,why?
ϣ���λָ��.

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads