PC Review


Reply
Thread Tools Rate Thread

c# and c++ socket communication

 
 
Yu
Guest
Posts: n/a
 
      4th May 2009
Hi dear all,

I am building an application in C#, while guys from other
department is building the application in C++. We want to send message
to each other program through Socket. Do you think it is possible?

I used to develop both server and client in Java. but i am not sure
two different languages can communicate via socket?

thanks all!


Vincent
 
Reply With Quote
 
 
 
 
Pavel Minaev
Guest
Posts: n/a
 
      4th May 2009
On May 4, 12:23*am, Yu <vincent2...@gmail.com> wrote:
> * *I am building an application in C#, while guys from other
> department is building the application in C++. We want to send message
> to each other program through Socket. Do you think it is possible?
>
> * *I used to develop both server and client in Java. but i am not sure
> two different languages can communicate via socket?


Sockets are OS networking primitives, and, as such, are language-
independent. You send bytes from one end, and receive bytes on the
other end - pretty much any language can handle that one way or
another. Of course, the interpretation of those bytes are up to you.

Now, if you need to do something more complicated that just streaming
something over, you might want to consider using a higher-level
framework, and not sockets directly. Examples would be DCOM (supported
out of the box in .NET and Win32 C++, so probably easiest), CORBA
(though I'm not aware of any up-to-date .NET provider), or ICE (http://
www.zeroc.com/). ICE in particular is very nice - powerful,
lightweight, and easy to use - but unfortunately, it's either GPL for
free (which may not be a problem for an internal app), or a commercial
version for some serious $$$.
 
Reply With Quote
 
Vincent
Guest
Posts: n/a
 
      4th May 2009
On May 4, 9:40*am, Pavel Minaev <int...@gmail.com> wrote:
> On May 4, 12:23*am, Yu <vincent2...@gmail.com> wrote:
>
> > * *I am building an application in C#, while guys from other
> > department is building the application in C++. We want to send message
> > to each other program through Socket. Do you think it is possible?

>
> > * *I used to develop both server and client in Java. but i am not sure
> > two different languages can communicate via socket?

>
> Sockets are OS networking primitives, and, as such, are language-
> independent. You send bytes from one end, and receive bytes on the
> other end - pretty much any language can handle that one way or
> another. Of course, the interpretation of those bytes are up to you.
>
> Now, if you need to do something more complicated that just streaming
> something over, you might want to consider using a higher-level
> framework, and not sockets directly. Examples would be DCOM (supported
> out of the box in .NET and Win32 C++, so probably easiest), CORBA
> (though I'm not aware of any up-to-date .NET provider), or ICE (http://www.zeroc.com/). ICE in particular is very nice - powerful,
> lightweight, and easy to use - but unfortunately, it's either GPL for
> free (which may not be a problem for an internal app), or a commercial
> version for some serious $$$.


Thanks Pavel! that is very helpful! now i have no worries anymore as
you said, the interpretation of those bytes is up to us, so i will
discuss this with guys from other department to determine a Protocol
that both program understands.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java socket communication jediknight Microsoft C# .NET 4 17th Jul 2006 06:50 PM
Socket Communication Through internet...! batista Microsoft Dot NET 1 5th May 2006 11:04 AM
Async socket communication =?ISO-8859-1?Q?Linus_R=F6rstad?= Microsoft Dot NET Compact Framework 3 21st Oct 2005 04:32 PM
Socket communication Scott Microsoft VB .NET 2 3rd Jun 2005 10:53 AM
Socket Communication behind LAN Yassar Microsoft C# .NET 2 22nd Oct 2003 04:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 AM.