Yes, that helps. I was asking about the send because sometimes it seems like we may be overloading the buffer and then I am wondering if data gets corrupted (partial data sent)?
Type: Posts; User: rex64
Yes, that helps. I was asking about the send because sometimes it seems like we may be overloading the buffer and then I am wondering if data gets corrupted (partial data sent)?
Is there a way to check the socket send buffer and make sure it is not full before sending? What happens if the buffer is full?
I think so. We are using the Sockets TCP IP class from the last post and improving it to resolve a few bugs. Can you ask the question in more detail? We plan on letting sockets do the tough work, but...
I am planning on improving my Sockets networking class. TCP. I am creating a back-end generic class that can be re-used in other games and applications.
I read this MSDN document but it still does not seem to match the behavior we are experiencing.
http://msdn.microsoft.com/en-us/library/w93yy28a.aspx
The answers to some of my questions from post...
I am planning on just using a byte array to re-assemble the data as it arrives. As long as no data is lost or messed up, it should work I believe?
I am having issues with my data being chopped (I am missing the tail). Also, I am receiving extra data. I have a few questions (actually a lot).
Do you recommend any great pre-made networking...
I would like to maximize StudyX's .NET compatibility, and make sure that nothing special has to be installed on Windows 8. I t looks like 3.5 is not available natively on Windows 8, but I am not sure...
Our shader technique is causing other text to get massed up. We would like to cancel the shader after we apply. We tried saving the EffectTechnique. We can do a spritebatch begin and end but we...
I am thinking that we may have overloaded the function with calls somehow. Anyways, the WriteTimeout seems very useful as well. I will let you know if we are still stuck. It may take another day or...
The issue seems random. Sometimes it locks on the first one (which is actually just a 3 string with the length of the data (usually around 450)).
Hmm, I know this normally works, because we use the function/class for some other things in the game. Although, it is newly written so it still has some issues. I am getting the error this time on...
If anyone knows networking I could use some help on my other thread (it has been a few days):...
I tried a few changes like SyncLock and CanWrite but it is still having the same issue:
''' <summary>
''' Sends binary data.
''' </summary>
Public Sub sendData(ByVal data() As...
The IDE seems to get stuck on this one line of code in our SendData. I wanted to see what you recommend to fix or debug this. We have tried a few debug.print type things. We are just getting some...
Ok, I think I am understanding everything. The loop is getting stuck in startHosting. Disposing is = to true in the debugger, but it does not seem to get off that line of code. It has a green arrow...
Also, it looks like this stream loop is not active all the time. Should this loop be running the entire time that it is connected? Or should this close at some point? Is this a good way to do it?
...
Things are working better, but for some reason I think the stream may be getting damaged. I can send data to the server and it receives it but I am not getting any data back on the stream after I run...
Thanks. I do understand the client server, but I am trying to learn the best way to implement it in VB .NET. So if I understand this correctly:
clsNetServer would have a single TcpListener. When a...
I think TcpListener is for watching an ip address and port. So I am thinking I should only need 1 of these. Are the clients just network streams? To disconnect a client do you just dispose of the...
Should each client connection on the server have its own TcpListner?
Dim server As TcpListener = Nothing
So if 100 clients were connected I would have:
QTY1: clsNetServer
QTY100:...
Should I have one total or 1 per client of these:
Dim server As TcpListener = Nothing
And what about this?
Dim connection As TcpClient = Nothing
Here is my plan. Let me know your thoughts.
93425
Ok, so this is what I am planning:
clsNetClient (connects to the server)
clsNetServer (has list of clsNetServerConnection)
clsNetServerConnection (each connection will be its own class)
It looks like you are creating a different instance of the class for each thread to keep track of them. Is that what you recommend I do? It sounds like it would use more resources, but it should work...
See attached
93319
This is a networking class we have written to work with a 3D game we are creating.
I just need to know which client or thread index the data is coming from. What do you recommend? I think I have multiple stream watchers. Maybe each one should pass in an index or a reference to the...
How can I keep track of which client index this belongs with? I have a ClientInfo list that I add clients to when they connect.
Public Structure ClientInfo
Dim ip As...
Ok. Can I raise the event like this:
RaiseEvent DataArrival(Me, message)
I looked at that, but we are doing multi-threaded and I am not sure how to check which client is communicating with the server. Sorry, I am a little new to multi-threaded networking.
Here is the stream watcher:
''' <summary>
''' Watches a stream while a user is connected? Stays alive while user is connected?
''' </summary>
Private Sub streamWatcher(ByVal...
It gets passed into the function from this event. Should this have more or different parameters?
Public Event DataArrival(ByVal message As String)
Ok, I had a feeling that was the case, so I re-wrote things to work around that.
My issue I have now is, how do I know what thread index/ip address data is arriving on?
This is my data...
I have created a multi-threaded server but can not figure out how to send an object/string. I think I have the ability to receive it already.
Server created:
serverThread = New...
When I move it out (just below the imports) I get Blue Wavy lines, and this error:
Error 45 Statement is not valid in a namespace. C:\Users\Jeff\Documents\Visual Studio...
I have been changing some namespace stuff, but I do not understand why I am getting this error. I can access the CoreClasses just fine, but API is an issue.
Code that gives me the error:
...
Good point, I think it is almost time to phase out 98 and SP1 :). Our software is used in countries where people can not afford new computers, and we don't want to exclude them, but I think most...
I am using .NET 2.0 because I want to maximize compatibility.
Each of the 4 controls re-size their height automatically to fit content, I did not think that anchors work with this? Basically the 4 controls are in a panel.