- This topic has 11 replies, 3 voices, and was last updated 9 years, 9 months ago by Anonymous.
-
AuthorPosts
-
January 2, 2015 at 21:11 #3570AnonymousInactive
Hello NCN-Team,
I want to ask if its possible that someone writes a simmple server and a simple client application which are not mixed with each other like in the exambles.. thats just confusing >.<And maybe show howto:
-Multiple Clients send a filled class of commands to the server and the server just logs it or sends any message back.namespace Server { public enum CMDs { SendFileList, SendFolderList, SendFile, StepIntoFolder, GoHomeFolder, DoNothing } public class ServerCommands { private CMDs _CurrentCommand; public CMDs CurrentCommand { get { return _CurrentCommand; } set { _CurrentCommand = value; } } } }
basicly I want to code something like:
A client connects to the server.exe and you can send through the client a command like ‘SendFile’ + Filename
and the server.exe sends a specific file back to the client. (means the onliest thing what the server does is receiving commands and sends files to the client plus sends ‘List<string>’ to the client for something like a file-browser that you can just double-click at any file at the client window and you get it from the server)Your idea of such a lib is realy great, but you confuse me with mixing up server and client to once -.-
Hope you can assist me, I would spend a bit money to the guy who helps on paypal 🙂- This topic was modified 9 years, 10 months ago by .
- This topic was modified 9 years, 10 months ago by .
January 3, 2015 at 02:49 #3573AnonymousInactivetried now some hours to get it work, but if I try it, nothing happens or the client tells me that the handle of anything is not set-ed up correctly -.- I could upload the source if it helps zzzz
January 9, 2015 at 18:14 #3582AnonymousInactiveso no-one is willing to help. very bad support.
- This reply was modified 9 years, 10 months ago by .
January 12, 2015 at 22:28 #3588AnonymousInactiveHeya Georg,
Sorry for the slow reply. We have included many examples in the download bundle starting from the most simple, which is only 11 lines long, up to advanced which demonstrates the more sophisticated features available in NetworkComms.Net. Most of the simple example are structured like this:
bool server = true; if (server) { //Do server stuff } else { //Do clientstuff }
It should be relatively easy to split these into completely independant examples. I would recommend however that you do not think of servers and clients as separate objects, just two applications that communicate with each other, both are capable of sending and receiving, that might help.
Unfortunately I am not able to offer anything more simple than what is already provided in the examples. If you have any specific questions about something you do not understand in the examples I would be happy to explain it.
Kind regards,
MarcJanuary 13, 2015 at 20:30 #3589AnonymousInactivei did that but i dont know what im doing wrong in sending and receiving, its like this in the file-sending examble Oo
[deleted]
here you can see my project, i will delete the link later on after you watched at it (think only costumers can see this forum)
- This reply was modified 9 years, 10 months ago by .
January 21, 2015 at 20:06 #3615AnonymousInactiveso basicly you removed the link, can you tell me where the mistake is ?? Oo
January 22, 2015 at 22:04 #3618AnonymousInactiveHeya Georg,
The support you need is really outside of our ability to offer for free here. We generally struggle to answers questions along the lines of ‘I want to build this, please show me how’, as they take up excessive amounts of our time, e.g. hours.
We do have paid for support agreements that we offer for exactly this kind of support. If we gave you a significant amount of time it would be be unfair on those who bought the support.
If you come across any bugs we will of course always spend time on these. We also spent ALOT of time putting together all of the example included in NetworkComms.Net. Have you also seen the walkthrough tutorials we created https://networkcomms.net/tutorials/?
Regards,
MarcJanuary 24, 2015 at 01:17 #3630AnonymousInactiveyou show here howto send costum objects:
NetworkComms.SendObject("Message", "127.0.0.1", 10000, myCustomObject);
but not how to receive them correctly on a incomming connection >.<
And I dont rly get whatfor the first param ist O_o means ‘”Message”‘ do I need exactly the same string
for receiving ? and what would be a correct receiving ?January 26, 2015 at 21:38 #3638AnonymousInactiveNetworkComms.Net does not infer the receiving data type. As such when you expect to receive an object you need to tell NetworkComms.Net what type it is going to be. In the case of the simple examples this is always a string, i.e. you see something like this:
NetworkComms.AppendGlobalIncomingPacketHandler<string>("Message" ...
Here you are telling NetworkComms.Net that you will be receiving a type of
<string>
, and that string will be sent with a packet type of"Message"
. For more information on this syntax I recommend you read about Generics, http://www.dotnetperls.com/generic.Regards,
MarcJanuary 28, 2015 at 14:54 #3644AnonymousInactive-.-
void ProcessServerStart() { //Trigger IncomingPartialFileData method if we receive a packet of type 'PartialFileData' NetworkComms.AppendGlobalIncomingPacketHandler<ServerCommands>("ServerCommands", IncomingCommandData); //Trigger the method OnConnectionClose so that we can do some clean-up NetworkComms.AppendGlobalConnectionCloseHandler(OnConnectionClose); Connection.StartListening(ConnectionType.TCP, new IPEndPoint(IPAddress.Parse(gServerInfo.IP), Convert.ToInt32(gServerInfo.Port))); }
doing it already like this zzz
-
AuthorPosts
- You must be logged in to reply to this topic.