Chat Demo server implementation in c#

HeliceraHelicera Member Aleksey FilippovOrganization: Institute for entrepreneurship "Strategy"Project: Simple chat
Hello! I wanted to implement Chat Demo's project ChatRoom (and then entire server part) in c#. But encountered that IceUtil isn't reachable in my c# project due to its COM-visibility. I'm starter in Ice, but I'm very interested.
  1. Can I use c#'s Threading.Mutex instead of its IceUtil implementation?
  2. What purpose in inheritng the ChatRoom class from IceUtil::Shared?
  3. What gives IceUtil::Shared?
  4. What should I use instead of smart pointers (e.g. IceUtil::Handle<T>) in c# implementation?
Addtional information:
  • Ice Version: 3.4.1
  • Compiler/IDE: Visual Studio 2010
  • OS: Windows 7

Thanks!

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi
    Hello! I wanted to implement Chat Demo's project ChatRoom (and then entire server part) in c#. But encountered that IceUtil isn't reachable in my c# project due to its COM-visibility. I'm starter in Ice, but I'm very interested.

    IceUtil isn't designed to be used in C# or .NET projects, is just for C++ applications.

    See http://www.zeroc.com/doc/Ice-3.4.1-IceTouch/manual/ProxyEndpointRef_2.html#73565
    Can I use c#'s Threading.Mutex instead of its IceUtil implementation?

    Yes, absolutely, you should use .NET threading API to implement your server and clients.
    # What purpose in inheritng the ChatRoom class from IceUtil::Shared?
    # What gives IceUtil::Shared?

    The ChatRoom inherits Shared to use the Ice C++ reference counting system, Shared is necessary to use Ice reference counting system in C++, see the manual for the details.

    http://www.zeroc.com/doc/Ice-3.4.1-IceTouch/manual/IceUtil.52.10.html
    # What should I use instead of smart pointers (e.g. IceUtil::Handle<T>) in c# implementation?

    In C# just create a normal class, .NET already provides garbage collection so you don't need smart pointers.

    Good luck with your chat server implementation
    Jose
Sign In or Register to comment.