|
|
|
[!] Как относитесь к модерированию на этом форуме? Выскажите свое мнение здесь
Сокет и ошибка 10038
- Подписаться на тему
- Сообщить другу
- Скачать/распечатать тему
|
|
Full Member Рейтинг (т): 7 |
День добрый. Добавлено 04.09.08, 12:14 |
trainer |
|
Цитата DrMort @ 04.09.08, 11:29 С другой стороны он передаётся в обработчик, так что существовать должен, в дебаге видно даже его настройки. Какое отношение обработчик события в компоненте VCL имеет к системному объекту? Системный объект видимо удален, экземпляр компонента остался. Любые попытки использовать системный объект через компонент будут давать ошибки(если компонент не будет самостоятельно пересоздавать системный объект, а он в данном случае не будет пересоздавать). Эээ… Ты закрываешь сокет в OnClientDisconnect? Сообщение отредактировано: trainer — 04.09.08, 13:17 |
Akme |
|
Указатели какие-нить не перезаписываешь? Что в дисконекте делается? Один поток в программе или нет? |
DrMort |
|
Full Member Рейтинг (т): 7 |
Никаких указателей не перезаписываю. В дисконнекте меняются просто флажки соединений — то есть в массив проставляется что васе пупкину больше ничего отсылать не стоит — мы его потеряли. Программа однопоточная — никаких специальных замутов наподобии CreateThread не делал. Сейчас попробую привести некий кусок кода
void __fastcall TForm1::ServerSocket1ClientDisconnect(TObject *Sender, TCustomWinSocket *Socket) { int CurrentLocation=0,counter=0; int NumSym=0,i,o; AnsiString CurrName=»»; for(i=0;i<MaxConnections;i++) //MaxConnections — константа содержащая максимальное число соединений с клиентами { if((Connections[i].Socket==Socket) && (Connections[i].Connected==true)) { if(Connections[i].Login!=»») { Memo1->Lines->Add(Connections[i].Login+» disconnected»); CurrName=Connections[i].Login; CurrName=CurrName.Trim(); } else Memo1->Lines->Add(«Non logined client disconnected»); Connections[i].Connected=false; Connections[i].Autorize=false; for(o=0;o<BufferLength;o++) Connections[i].SendBuffer[o]=»»; Connections[i].BufferCounter=0; Connections[i].Idle=0; Form1->StatisticMonitor->Values[«CurrentConnection»]=IntToStr(StrToInt(Form1->StatisticMonitor->Values[«CurrentConnection»])-1); break; }; }; } Connections[] — массив структур содержащий сведения о соединениях, В нём есть поле Socket значение которого заполняется при установке связи. Но все это описание зряшное, потомучто содержимое обработчика можно полностью убрать и ничего не изменится — проверено. Так же пробовал в начале каждой процедуры имеющейся в проекте ставить стоп поинт и отслеживать что ещё происходит в момент когда клиент обрывает связь. Так вот ничего не происходит — сразу срабатывает OnClientDisconnect. Сразу после его срабатывания вылетает подряд две ошибки. Так что вероятнее всего дело не в исходном коде, а в настройках/багах проекта/операционной системы/среды программирования. Чуть позже попробую на чистом компе возвести SQL сервер и запустить серверное приложение. Если ошибка исчезнет — всему виной срада/операционка. |
leo |
|
Цитата DrMort @ 05.09.08, 01:20 В дисконнекте меняются просто флажки соединений — то есть в массив проставляется что васе пупкину больше ничего отсылать не стоит — мы его потеряли
И что разорванное соединение так и остается навсегда в массиве Connections или удаляется ? Цитата DrMort @ 05.09.08, 01:20 Программа однопоточная — никаких специальных замутов наподобии CreateThread не делал Чтобы прога стало многопоточной достаточно установить «замут» ServerType:=stThreadBlocking |
DrMort |
|
Full Member Рейтинг (т): 7 |
Разорваное соединение остаётся, но никогда не используется. По прошествии некоторого времени по таймеру выбираются все разорваные соединения и удаляются из массива. |
Oleg2004 |
|
Есть такая ситуация — что в режиме дебага многие среды при тестирование клиент-серверных приложений глючат. |
DrMort |
|
Full Member Рейтинг (т): 7 |
Вне среды все равно глючит. Переставил винду — все та же ошибка. Завтра попробую переставить винду и не ставить ни одного драйвера. |
DrMort |
|
Full Member Рейтинг (т): 7 |
Переставил винду поверх старой. Глючит. Форматнул винт — нормально. С дровами тоже нормально. Похоже что-то было с операционкой, может какие нить последствия лечения вирусни. Всем спасибо за мысли. |
0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
0 пользователей:
- Предыдущая тема
- Borland C++ Builder/Turbo C++ Explorer
- Следующая тема
[ Script execution time: 0,0278 ] [ 16 queries used ] [ Generated: 12.02.23, 19:37 GMT ]
Содержание
- Ошибка socket error 10038
- Why do I receive «FLEXlm error: -15,570. System Error: 10038 Winsock: Specified socket is invalid» when I try to start MATLAB?
- Direct link to this question
- Direct link to this question
- Accepted Answer
- Direct link to this answer
- Direct link to this answer
- More Answers (0)
- See Also
- Categories
- Products
- Community Treasure Hunt
- How to Get Best Site Performance
- Americas
- Europe
- Asia Pacific
- How Socket Error Codes Depend on Runtime and Operating System
- Digging into the problem
- SocketErrorCode
- NativeErrorCode
- ErrorCode
- Writing cross-platform socket error handling
- Overview of the native error codes
- Why do I receive «FLEXlm error: -15,570. System Error: 10038 Winsock: Specified socket is invalid» when I try to start MATLAB?
- Direct link to this question
- Direct link to this question
- Accepted Answer
- Direct link to this answer
- Direct link to this answer
- More Answers (0)
- See Also
- Categories
- Products
- Community Treasure Hunt
- How to Get Best Site Performance
- Americas
- Europe
- Asia Pacific
Ошибка socket error 10038
Please contact us if you have any trouble resetting your password.
The problem is that you increment the client count *before* you assign to the array. This causes assignment to the wrong slot, which means you pass a not-a-socket value into select(). 10038 means «not a socket» which makes sense.
Also, incrementing the counter first means that you have a potential buffer overrun. And, just because listen() takes 9 as a parameter, doesn’t mean that the number of potential connections will be limited to 9 — the *backlog* may be limited to 9. You could get 100 connections, and you’d totally crash your server. Or, worse, someone might exploit it as a remote code execution vulnerability.
Is this what you mean my ‘client count’:
If so, couldn’t I just put an if around it? Like this:
Quote: Original post by Azjherben
couldn’t I just put an if around it? Like this:
The if statement doesn’t do anything. If numclients is less than or equal to zero, the loop won’t execute (0 Cancel Save
You did not actually show the area where you increment the client count.
Specifically, you keep the client count in the «numclients» variable.
This is meant as good advice, not as a put-down: If you can’t figure out this simple problem from the information we’ve already given you, you should not be writing network code in C++ yet — you need to first learn the language really well, because distributed concurrent programming is hard as it is even when you’re fully fluent in developing in the language of your choice.
Quote: Original post by hplus0603
The problem is that you increment the client count *before* you assign to the array. This causes assignment to the wrong slot, which means you pass a not-a-socket value into select(). 10038 means «not a socket» which makes sense.
Also, incrementing the counter first means that you have a potential buffer overrun. And, just because listen() takes 9 as a parameter, doesn’t mean that the number of potential connections will be limited to 9 — the *backlog* may be limited to 9. You could get 100 connections, and you’d totally crash your server. Or, worse, someone might exploit it as a remote code execution vulnerability.
Okay, looking at what you said, I realize that I should have it check for the lowest number available out of the maximium amount (9) and set it to that. And have clients br removed from the array when they disconnect. (Making that number available again) As for the main error, I’ll try to fix that first. If I get a completly new error, or it works, I’ll post. Also, that for right after the while, that is what you mean by ‘client count’ right.
Источник
Why do I receive «FLEXlm error: -15,570. System Error: 10038 Winsock: Specified socket is invalid» when I try to start MATLAB?
Direct link to this question
Direct link to this question
Accepted Answer
Direct link to this answer
Direct link to this answer
0 Comments
More Answers (0)
See Also
Categories
No tags entered yet.
Products
Find the treasures in MATLAB Central and discover how the community can help you!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- Deutsch
- English
- Français
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 简体中文 Chinese
- English
- 日本 Japanese (日本語)
- 한국 Korean (한국어)
Accelerating the pace of engineering and science
MathWorks is the leading developer of mathematical computing software for engineers and scientists.
Источник
How Socket Error Codes Depend on Runtime and Operating System
Rider consists of several processes that send messages to each other via sockets. To ensure the reliability of the whole application, it’s important to properly handle all the socket errors. In our codebase, we had the following code which was adopted from Mono Debugger Libs and helps us communicate with debugger processes:
In the case of a failed connection because of a “ConnectionRefused” error, we are retrying the connection attempt. It works fine with .NET Framework and Mono. However, once we migrated to .NET Core, this method no longer correctly detects the “connection refused” situation on Linux and macOS. If we open the SocketException documentation, we will learn that this class has three different properties with error codes:
- SocketError SocketErrorCode : Gets the error code that is associated with this exception.
- int ErrorCode : Gets the error code that is associated with this exception.
- int NativeErrorCode : Gets the Win32 error code associated with this exception.
What’s the difference between these properties? Should we expect different values on different runtimes or different operating systems? Which one should we use in production? Why do we have problems with ShouldRetryConnection on .NET Core? Let’s figure it all out!
Digging into the problem
If we run it on Windows, we will get the same value on .NET Framework, Mono, and .NET Core:
SocketErrorCode | ErrorCode | NativeErrorCode | |
.NET Framework | 10061 | 10061 | 10061 |
Mono | 10061 | 10061 | 10061 |
.NET Core | 10061 | 10061 | 10061 |
10061 corresponds to the code of the connection refused socket error code in Windows (also known as WSAECONNREFUSED ). Now let’s run the same program on Linux:
SocketErrorCode | ErrorCode | NativeErrorCode | |
Mono | 10061 | 10061 | 10061 |
.NET Core | 10061 | 111 | 111 |
As you can see, Mono returns Windows-compatible error codes. The situation with .NET Core is different: it returns a Windows-compatible value for SocketErrorCode (10061) and a Linux-like value for ErrorCode and NativeErrorCode (111). Finally, let’s check macOS:
SocketErrorCode | ErrorCode | NativeErrorCode | |
Mono | 10061 | 10061 | 10061 |
.NET Core | 10061 | 61 | 61 |
Here, Mono is completely Windows-compatible again, but .NET Core returns 61 for ErrorCode and NativeErrorCode . In the IBM Knowledge Center, we can find a few more values for the connection refused error code from the Unix world (also known as ECONNREFUSED ):
- AIX: 79
- HP-UX: 239
- Solaris: 146
For a better understanding of what’s going on, let’s check out the source code of all the properties.
SocketErrorCode
These values correspond to the Windows Sockets Error Codes.
NativeErrorCode
In .NET Core, the native code is calculated in the constructor (see SocketException.cs#L20):
The Windows implementation of GetNativeErrorForSocketError is trivial (see SocketException.Windows.cs):
The Unix implementation is more complicated (see SocketException.Unix.cs):
TryGetNativeErrorForSocketError should convert SocketError to the native Unix error code. Unfortunately, there exists no unequivocal mapping between Windows and Unix error codes. As such, the .NET team decided to create a Dictionary that maps error codes in the best possible way (see SocketErrorPal.Unix.cs):
Once we have an instance of Interop.Error , we call interopErr.Info().RawErrno . The implementation of RawErrno can be found in Interop.Errors.cs:
Here we are jumping to the native function SystemNative_ConvertErrorPalToPlatform that maps Error to the native integer code that is defined in errno.h. You can get all the values using the errno util. Here is a typical output on Linux:
Note that errno may be not available by default in your Linux distro. For example, on Debian, you should call sudo apt-get install moreutils to get this utility. Here is a typical output on macOS:
Hooray! We’ve finished our fascinating journey into the internals of socket error codes. Now you know where .NET is getting the native error code for each SocketException from!
ErrorCode
Writing cross-platform socket error handling
There was a lot of work involved in tracking down the error code to check against, but in the end, our code is much more readable now. Adding to that, this method is now also completely cross-platform, and works correctly on any runtime.
Overview of the native error codes
We executed this program on Windows, Linux, and macOS. Here are the aggregated results:
Источник
Why do I receive «FLEXlm error: -15,570. System Error: 10038 Winsock: Specified socket is invalid» when I try to start MATLAB?
Direct link to this question
Direct link to this question
Accepted Answer
Direct link to this answer
Direct link to this answer
0 Comments
More Answers (0)
See Also
Categories
No tags entered yet.
Products
Find the treasures in MATLAB Central and discover how the community can help you!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- Deutsch
- English
- Français
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 简体中文 Chinese
- English
- 日本 Japanese (日本語)
- 한국 Korean (한국어)
Accelerating the pace of engineering and science
MathWorks is the leading developer of mathematical computing software for engineers and scientists.
Источник
Ok so I know that to use select to you have to do FD_ZERO and FD_SET before each time now I’ll post my c code in a second but basicly my server application will accept the first client and every thing works fine. When I go to connect my second client it gives me a 10038 error. Now the connection with the first client stays open and working even after the error but when ever I try to get a second one connected it always drops.
Every time my loop cycles I have it do a routine for FD_ZERO and FD_SET and Im still getting this. Below is my server code. The offending issue happens during the first scan of select on the second connected client when it checks to see if theres any thing to read. The second client gets connected and even gets a string back from the server saying its connected but its when I do a select on it in the START SELECT CONNECTED PHASE for the first time that it craps out.
Any help would be apperciated. Thanks,
[source lang=c]
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <winbase.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <conio.h>
#include <time.h>
#include "../../library/fileOperations.h"
#define MAXSOCKETS 5
#define DEFAULT_PORT "27052"
#define MAX_BUFFER 500
int error_WSAStartup;
int error_bind;
int error_listen;
int error_shutdown;
int error_getaddrinfo;
int error_recv;
int lineNumber = 0;
int lineNumber2 = 0;
char hold[5];
int main (int argc, char **argv)
{
/**********VAR PHASE********************************/
WSADATA info_WSADATA;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET clientSocket[MAXSOCKETS];
struct addrinfo *result = NULL;
struct sockaddr_in address_listenSocket;
struct sockaddr_in serverAddress;
struct fd_set clientSocketSet[MAXSOCKETS];
struct fd_set listenSocketSet;
struct timeval maxTime;
char send_buffer[MAX_BUFFER] = "Connection Established";
char recv_buffer[MAX_BUFFER];
char hold[10];
int sendResult;
int recv_bufferLen = MAX_BUFFER;
int clientConnected = 0;
serverAddress.sin_addr.s_addr = INADDR_ANY;
serverAddress.sin_family = AF_INET;
serverAddress.sin_port = htons(10023);
/****** Work Phase ***********************************/
maxTime.tv_sec = 2;
maxTime.tv_usec = 0;
error_WSAStartup = WSAStartup(MAKEWORD(2,2), &info_WSADATA);
if(error_WSAStartup != 0)
{
printf("WSAStartup Failed: %dn",error_WSAStartup);
exit(0);
}
listenSocket = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
if(listenSocket == INVALID_SOCKET)
{
printf("Error at socket(): %ldn", WSAGetLastError());
freeaddrinfo(result);
WSACleanup();
exit(0);
}
error_bind = bind(listenSocket,(LPSOCKADDR)&serverAddress,sizeof(serverAddress));
if(error_bind == SOCKET_ERROR)
{
printf("bind failed: %dn", WSAGetLastError());
freeaddrinfo(result);
closesocket(listenSocket);
WSACleanup();
exit(0);
}
error_listen = listen(listenSocket,SOMAXCONN);
if(error_listen == SOCKET_ERROR)
{
printf("Listen Failed: %dn", WSAGetLastError());
closesocket(listenSocket);
WSACleanup();
exit(0);
}
/*EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
MAIN WHILE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE*/
int selectReturn = 0;
while(1)
{
/*|||||||||||||||||||||||||||START SELECT LISTEN PHASE ||||||||||||||||||||||||*/
FD_ZERO(&listenSocketSet);
FD_SET(1,&listenSocketSet);
listenSocketSet.fd_array[0] = listenSocket;
selectReturn = select(FD_SETSIZE,&listenSocketSet,NULL,NULL,&maxTime);
printf("listen Selectn");
if(selectReturn == SOCKET_ERROR)
{
printf("select listen failed: %dn",WSAGetLastError());
printf("selectReturn: %dn",selectReturn);
closesocket(listenSocket);
WSACleanup();
exit(0);
}
else
{
if(selectReturn == 1)
{
clientSocket[clientConnected] = accept(listenSocket,NULL,NULL);
clientConnected = clientConnected + 1;
if(clientSocket[clientConnected-1] == INVALID_SOCKET)
{
printf("Accept Failed: %dn",WSAGetLastError());
closesocket(listenSocket);
clientConnected = clientConnected - 1;
}
sendResult = send(clientSocket[clientConnected-1],send_buffer,strlen(send_buffer)+1,0);
if(sendResult == SOCKET_ERROR)
{
printf("send failed: %dn",WSAGetLastError());
closesocket(clientSocket[clientConnected-1]);
clientConnected = clientConnected - 1;
}
}
}
/*|||||||||||||||||||||||||||END SELECT LISTEN PHASE ||||||||||||||||||||||||*/
/*|||||||||||||||||||||||||||START SELECT CONNECTION PHASE ||||||||||||||||||||||||*/
if(clientConnected > 0)
{
lineNumber = 0;
while(lineNumber < clientConnected)
{
lineNumber2 = 0;
while(lineNumber2 < clientConnected)
{
FD_ZERO(&clientSocketSet[lineNumber2]);
FD_SET(1,&clientSocketSet[lineNumber2]);
clientSocketSet[lineNumber2].fd_array[lineNumber2] = clientSocket[lineNumber2];
lineNumber2++;
}
selectReturn = 0;
selectReturn = select(FD_SETSIZE,&clientSocketSet[lineNumber],NULL,NULL,&maxTime);
printf("Connection Select %dn",lineNumber);
if(selectReturn == SOCKET_ERROR)
{
printf("select connection Failed: %dn",WSAGetLastError());
printf("selectReturn: %dn",selectReturn);
closesocket(clientSocket[lineNumber]);
clientConnected = clientConnected - 1;
}
else
{
if(selectReturn == 1)
{
error_recv = recv(clientSocket[lineNumber],recv_buffer,MAX_BUFFER,0);
if(error_recv == SOCKET_ERROR)
{
printf("Recive Failed: %dn",WSAGetLastError());
closesocket(clientSocket[lineNumber]);
clientConnected = clientConnected - 1;
}
printf("%sn",recv_buffer);
}
}
lineNumber++;
}
}
}
/*|||||||||||||||||||||||||||END SELECT CONNECTION PHASE ||||||||||||||||||||||||*/
/*EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
END MAIN WHILE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE*/
}
Do or do not there is no try -yoda
Error 10038 is a WSAENOTSOCK, which according to MSDN means that «One of the descriptor sets contains an entry that is not a socket.»
This problem could stem from the way you’re using FD_SET. When you add a socket to the fd_set use
FD_SET(socket, &listenSocketSet);
Never manipulate the fd_count and fd_array members of the fd_set directly.
Select returns 0 when it times out, you’re not taking that into consideration. It could be the problem. Read above.
[Edited by — xor on April 16, 2008 10:00:19 AM]
If I set FDCOUNT to 1 and then do FD_SET(FDCOUNT,&listenSocketSet) im still stating that fd_set sets aside one array unit for listenSocketSet. Besides the application listens and accepts fine.
As for not stating that if it returns zero i kinda do in a round about way. If it returns zero it should just fall though and continue with the rest of the program which would not prodcue the invalid socket type error that im getting.
Do or do not there is no try -yoda
/*|||||||||||||||||||||||||||START SELECT CONNECTION PHASE ||||||||||||||||||||||||*/ if(clientConnected > 0) { lineNumber = 0; while(lineNumber < clientConnected) { lineNumber2 = 0; while(lineNumber2 < clientConnected) { FD_ZERO(&clientSocketSet[lineNumber2]);
If I understand correctly what you’re trying to do, that FD_ZERO should be outside that while.
selectReturn = select(FD_SETSIZE,&clientSocketSet[lineNumber],NULL,NULL,&maxTime); printf("Connection Select %dn",lineNumber); if(selectReturn == SOCKET_ERROR) { printf("select connection Failed: %dn",WSAGetLastError()); printf("selectReturn: %dn",selectReturn); closesocket(clientSocket[lineNumber]); clientConnected = clientConnected - 1; } else { if(selectReturn == 1)
Again, if I understand what you’re trying to do here, the selectReturn value might be more then just 1.
I actually moved the FD_ZERO and FD_SET into the loop before I posted it. If its out side of that loop its the same result. Also the error drops out when you check to see if selectReturn is == to SOCKET_ERROR, if its more then one it should only be say like 2 or 3 and should make it past this part. It shouldn’t be equal to SOCKET_ERROR which is whats coming back.
Do or do not there is no try -yoda
Quote:Original post by Xloner12
If I set FDCOUNT to 1 and then do FD_SET(FDCOUNT,&listenSocketSet) im still stating that fd_set sets aside one array unit for listenSocketSet. Besides the application listens and accepts fine.
But… but you’re using undocumented implementation details to do something and it’s not working. I would argue that the application is not listening and not working fine, which is why you’ve posted here.
Consider this.
FD_SET(1,&listenSocketSet);
Do you realize that you’ve just asked select() to listen on stdout? Is that what you really want? I suspect what you meant to say was
FD_SET(listenSocket, &listenSocketSet);
followed by something like
selectReturn = select(listenSocket+1, &listenSocketSet,NULL,NULL,&maxTime);
—smw
Stephen M. Webb
Professional Free Software Developer
FD_SET macro takes two var’s
One is how many file sets and the second is the File set theme selves. I dont belive but could be wrong that the 1 is standing for stdout. when I pass the number one it just states that there will only be one file descriptor.
Am I wrong on this?
Do or do not there is no try -yoda
From the MSDN entry on select:
Quote:
FD_SET(s, *set)
Adds descriptor s to set.
Notice it does not say s number of descriptors. It adds the descriptor s to the set.
Ok I see, thanks every one. I just tested it out and now its working, simitanous connections. Thanks to every one, this is why I love this board. Thanks again.
[Edited by — Xloner12 on April 16, 2008 2:03:28 PM]
Do or do not there is no try -yoda