473,395 Members | 1,497 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,395 software developers and data experts.

PLS Vb.net Socket MultiThreading

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
1 3806
Richard,

Did you see this message from Jason Cooke in this newsgroup.

[ANN] August 24, "Threading with Visual Basic .NET" chat

Do you have questions about how to create multi-threaded applications? Or do
you wonder about what those threads are actually doing? Then join members of
the Visual Basic team as they answer your questions about using threading
with Visual Basic .NET.

Date:
August 24, 2004
1:00 - 2:00 P.M. Pacific time
4:00 - 5:00 P.M. Eastern time
20:00 - 21:00 GMT
(For a list of local time zones relative to GMT, please see
http://msdn.microsoft.com/chats/timezones.asp.)

Outlook Reminder:
http://msdn.microsoft.com/chats/outl...ET_Aug2404.ics

Location:
http://msdn.microsoft.com/chats (then click the name of the chat to enter
the chat room)

For more information about Visual Basic .NET, see
http://msdn.microsoft.com/vbasic/
To see a list of upcoming chats or set a reminder for this chat, see
http://msdn.microsoft.com/chats.
For archives of previous chats, see
http://msdn.microsoft.com/chats/recent.asp.

Thanks!
Jason Cooke
VB.NET Team

========
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
(c) 2004 Microsoft Corporation. All rights reserved.

Nov 21 '05 #2

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

Similar topics

2
by: Rekkie | last post by:
Hi, I am trying to implement a ping client that is multithreading. The approach I have used is to create a ping class which I instantiate from the main thread and which contains a method...
4
by: zbcong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a...
5
by: sarge | last post by:
I would like to know how to perform simple multithreading. I had created a simple form to test out if I was multithreading properly, but got buggy results. Sometime the whole thig would lock up...
13
by: coloradowebdev | last post by:
i am working on basically a proxy server that handles requests via remoting from clients and executes transactions against a third-party server via TCP. the remoting site works like a champ. my...
3
by: O.B. | last post by:
When sharing a Socket between threads, are the socket operations automatically synchronized to support multithreading? For example: Thread1 sets up a server socket to listen and invokes...
7
by: Ray | last post by:
Hello, Greetings! I'm looking for a solid C++ multithreading book. Can you recommend one? I don't think I've seen a multithreading C++ book that everybody thinks is good (like Effective C++ or...
0
by: JYOTIRANJAN | last post by:
Hi All, My Application is developed using C on linux. It is a multithreaded application and 10 threads are waiting for message in pool.Each thread receives message continusly in a while loop from...
2
by: kdeveloper | last post by:
Hello Pythonists, I am building a non blocking socket server for incomming UDP packets. The server needs to run at least three threads: 1. getting data and pushing to "some" storage (at the...
15
by: learner247 | last post by:
Hi, I am learning csharp and have a question: My question is about handling a receiving socket. I use the backgroundworker class for multithreading. In the doWork event there is a while...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.