ID:155033
 
How would I go about communicating with a C# server and receiving message in BYOND through world/Topic()? Also, if I have a C# client connect to a DD server could I send messages to the clients through sockets and receive them through Topic()?
Well you can do it with javascript so there's a chance it might work with C#.
You essentially require the development of a C++ DLL to offer socket support (or shared memory / IPC if local only communication is required). If such a thing exists, it is probably more pragmatic that communication is handled in duplex via this DLL, instead of involving world topic.

Could you elaborate on the scenario you have in mind for this? Such a library has been on my list for a long while, and a positive test-case for it's use would be more productive indeed.
In response to Stephen001
It would mostly be for local communication. Later on I would like to try and make my own server system using DLLs but I don't understand how to link them up with BYOND well enough. I want to use C# to communicate with BYOND to allow for the use of 360 Controllers in BYOND games. If you can point me in the right direction or help me in the development of such a system I would greatly appreciate it.
In response to Zaltron
I suspect I can develop a low-level DLL for you in C++ to do so. DLL calling is exclusively server-side. Does this affect your scenario at all?
In response to Stephen001
I can work with it. :)
In response to Zaltron
I suspect you'd also be releasing the DLL to the public, Stephen?

If so, thanks :)
In response to ANiChowy
You may want to post that under one of his forum posts otherwise I get the alert not him.
In response to Zaltron
I didn't know that.

I think he'll be checking back anyways, but thanks for that info.
It is possible to make C# program which can call world.Topic() and receive data from world.Export(). If you search forum you'll find source code for sending data from C#, I'm not sure if there's code for receiving though (however theory is there for sure).
In response to Zaoshi
Zaoshi wrote:
It is possible to make C# program which can call world.Topic() and receive data from world.Export(). If you search forum you'll find source code for sending data from C#, I'm not sure if there's code for receiving though (however theory is there for sure).

I'm not sure how to find that on these forums. it won't let me search for C# or "C#", it says "Query failed: the following word is too common: c". I tried csharp and found a few links but nothing of importance. When I search for World Topic Export or world/Topic I find nothing about C#.
Zaltron wrote:
How would I go about communicating with a C# server and receiving message in BYOND through world/Topic()? Also, if I have a C# client connect to a DD server could I send messages to the clients through sockets and receive them through Topic()?

I personally don't recall seeing a C# implementation for this on BYOND's forums, so you might have to port it yourself if you can't find it.

PHP's: http://www.byond.com/developer/forum/?id=394116
Perl's: http://www.byond.com/developer/forum/?id=784278

Looks like it won't be much trouble to port, judging by this: http://www.csharp-examples.net/socket-send-receive/
If you end up not doing it, I will.
In response to Zaltron
Hm... I can't seem find it either.
You could try asking Tsfreaks, it's him who started discussion long about about that code, maybe he'll have original one too.
There's very few details I remember: need to send length of data and it it need big either small endian encoding (forgot which one). Maybe Nadrew and someone else from staff will be able to help you.
In response to Zaltron
I have an incomplete communicator that works as an attempt at client-side DLL communication. I still need to fix some of the bugs and is currently slow right now, but I'll let you play with it. :P
In response to Bandock
Bandock wrote:
I have an incomplete communicator that works as an attempt at client-side DLL communication. I still need to fix some of the bugs and is currently slow right now, but I'll let you play with it. :P

I would like that, I am going to be gone most of tomorrow except around the afternoon time. I'll send you a page with my email unless you have a better way of getting it to me.
In response to Zaltron
Zaltron wrote:
Bandock wrote:
I have an incomplete communicator that works as an attempt at client-side DLL communication. I still need to fix some of the bugs and is currently slow right now, but I'll let you play with it. :P

I would like that, I am going to be gone most of tomorrow except around the afternoon time. I'll send you a page with my email unless you have a better way of getting it to me.

Will do Zaltron. :D