473,219 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,219 software developers and data experts.

VB.NET socket, Threading and Database Problem

OS: Winxp and Win2003
Visual Basic.NET 2003
MS-SQL Server 2000

hey all

I am a newbie in vb.net but i have managed to build a simple chat server
in vb.net using socket and a client connecting to it made in vb6. Some
of the code in the server are based on the basic samples that i get from
other authors. To give you an idea, the server uses sockets,
multi-threading and a database connection to MS-SQL server 2000. the off
line messages, contacts lists, current status of the rooms and
conference rooms are stored in the database. The client app is already
done and it already meets the requirements for connecting into the
server, but my server has not been optimized to do its job since i am in
the code,debug and learn level, i'm still trying to make it stable. But
during my testing of the server it pops an error which i haven't solved
for a few weeks now especially if the server is running for a longer
period of time. I have searched to a number of sites but i wouldn't give
me the exact solution to my problem.

Problem:

1.)Once the server is running more than 24 hours and receives a bunch of
chat messages from the client application it tends to slows down its
response to the client although im testing it on a single user
connection, what i did was only send a test flood of messages , then
connect and disconnect a hundred times.

2.)After a hundred of test flood messages to the server and
connect/disconnect session from the client, the server pops an exception
error such as “operation not allowed on a non-connected sockets” but
when i click ok button of the msgbox my client app sees that it is still
connected to the server. The client could still send commands such as
[user search but not on private and room chatting anymore] .

3.)When the server tries to save a data into the sql server it then
gives me another error “the statement has been terminated”.

4.)the problem that i mostly see is during login, private and room chat,
saving to database. Other strange behavior of the server is that it can
still recieve a search user command and then reply for the result but
when i try to do private or room chat, there it pops the error messages
again and no reply to the client whatsoever.
Questions
1.)Do you think vb.net can handle more than a hundred concurrent user
online or more or maybe thousand?
2.)Do you think its a good choice to have the client built in vb6 and
the chat server built in vb.net ? any ideas are welcome

Guys please i really need your help with my problems (1-4) ! especially
on socket and multi-threading. Any comments, suggestion or modification
of the code are welcome. I have provided the server code in my site,
I've omitted some of the codes and classes, to get you into the direct
point, i have posted additional information of my problem in my site and
some other screen shot of the error.

my site:http://www.geocities.com/jimmypearly/index.html
Thanks
Jim

PS sorry for my poor english.
Nov 21 '05 #1
0 1867

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Gonçalo Rodrigues | last post by:
Hi, My setup is the following: I have socket s from which I want to read and write. So I made the following set up: There is a thread whose only job is to read. Any data read (from recv call)...
8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
4
by: flupke | last post by:
Hi, I have a gui (made in wxPython) that enables a user to connect to a server and issue some commands. The problem occurs when i try to disconnect the client. It exits but it doesn't return to...
5
by: Russell Warren | last post by:
Does anyone know the scope of the socket.setdefaulttimeout call? Is it a cross-process/system setting or does it stay local in the application in which it is called? I've been testing this and...
1
by: scott | last post by:
Hi all hope some one can help me with this prob because it is really annoying me and I can't seem to solve it. Just like to say thx to any one that can offer any help. Ok the prob. I have a...
1
by: richard | last post by:
OS: Winxp and Win2003 Visual Basic.NET 2003 MS-SQL Server 2000 hey all I am a newbie in vb.net but i have managed to build a simple chat server in vb.net using socket and a client connecting...
2
by: Stressed Out Developer | last post by:
We have an application that has a 200 count loop that does the following: ' Each time thru the loop we pass the next IP Address is a range (aka 192.168.4.50 thru 192.168.4.254) Try If...
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.