IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.58 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-05-25
[14:59]<mjzymygo>Damn it... I was thinking os System.Net.Sockets...
[14:59]<wyfaj>or maybe i should ask what it really is you're trying to achieve
[15:00]<wyfaj>Moridin8: even then theres only tcpclient/listener
[15:00]<sdnffdxdlld>ello matt
[15:00]<2uc>wilco: actually all I wanted was some logging output like "Client XYZ did this and that"
[15:00]<mjzymygo>Moriding8: Yeh.. i know. I was being stoopid
[15:00]<zyccus>System.Runtime.Remoting.Channels.Tcp.TcpChannel ?
[15:00]<wyfaj>buk: where XYZ is what? some higher-leve identity (like a username), or something low-level, like an ip address ?
[15:01]<wyfaj>level*
[15:01]<2uc>wilco: mmmh, something like .toString() of the client object?
[15:01]<mjzymygo>buk: Your trying to get server to establish client identity right?
[15:02]<2uc>Moridin8: actually I'm just playing around stumbling from one question to next ;^)
[15:02]<2uc>but yes, its a client that identifies to the server
[15:02]<vjvrfd_fjsv>hm why in the hell in DataGridView error icon is aligned to the left?
[15:02]<wyfaj>buk: that'd probably require a duplex channel
[15:02]<mjzymygo>You hosting in IIS? a Windows Service? or a normal process?
[15:02]<vjvrfd_fjsv>er . to the right that is..;-)
[15:02]<2uc>Moridin8: plain process
[15:02]<vjvrfd_fjsv>and how to make it the oposite
[15:03]<sdnffdxdlld>totaly_lost: I was just about to say isnt the left the best place for it hehe ;)
[15:03]<vjvrfd_fjsv>so .. how to put it into left side?:)
[15:03]<2uc>wilco: as far as I read in the docs I need to open a TcpChannel(0) on the client side to make the communication bidirectional
[15:03]<sdnffdxdlld>not a clue ;)
[15:03]<wyfaj>buk: let the client instantiate a player object that lives on the server ?
[15:04]<vjvrfd_fjsv>case if u make RowHeader less than 41 .. it just doesn't show
[15:04]<vjvrfd_fjsv>damn..
[15:04]<wyfaj>(obviously you need to add some stuff to deal with security etc, but thats another discussion)
[15:04]<wyfaj>buk: do you really need bidirectional communication though?
[15:04]<2uc>wilco: yes
[15:04]<wyfaj>why?
[15:04]<wyfaj>wouldnt polling be enough?
[15:05]<2uc>wilco: imaging a poker game ... the server says to the client "Hey, its your turn." ... imagine the client that says "Hey server, I'll join that table".
[15:05]<2uc>polling isnt enough and that bidirectional communication isnt a problem at all
[15:05]<wyfaj>ok
[15:06]<2uc>I just wondered if I can trackback to the client-obj when its not provided in the function call
[15:06]<zyccus>Is remoting a good idea? I heard it's a real pain in the arse to debug
[15:06]<wyfaj>WCF :o)
[15:06]<2uc>rikkus: *shrug* I started with C# 2 days ago ;^)
[15:06]<wyfaj>buk: i dont know that
[15:06]<wyfaj>buk: you should really find some articles by ingo rammar
[15:07]<wyfaj>he's written several things, including a "defacto" book about remoting
[15:07]<2uc>Advanced .NET Remoting, yeah
[15:07]<wyfaj>you could probably easily find some kind of identifier of a client though, and use that to lookup a name that the user provided when he connected
[15:08]<2uc>Yeah, sure
[15:08]<2uc>though I would have to provide that identifier in every function call
[15:08]<2uc>which I thought is a bit ugly and tried to avoid it
[15:09]<wyfaj>something like an ip might be sufficient, if you dont care about supporting multiple connections from 1 ip
[15:09]<wyfaj>or actually, even the player object reference should be enough really
[15:09]<2uc>In days of bloody NAT I should support that
[15:09]<2uc>*nod*
[15:09]<wyfaj>since the player object should live as long as the player is still connected
[15:09]<2uc>yeah
[15:10]<2uc>providing an identifier isnt much of a problem
[15:10]<wyfaj>no, the point is you dont need an identifier in that case
[15:10]<2uc>*grin* as I said, I just wanted to avoid it
[15:10]<2uc>err, what?
[15:10]<wyfaj>the object ref. of the player on the server is your "identifier"
[15:11]<2uc>ok, so I have a list of 10 player objs
[15:11]<2uc>and the server function foobar() is called by "some" client
[15:11]<2uc>how do I find the object in the list?
[15:12]<wyfaj>right, i guess, like you said before, the client just passes the player object it constructed with each call
[15:12]<wyfaj>shouldnt be expensive though :)
[15:12]<2uc>yeah, thats my point, its expensive
[15:12]<wyfaj>how so?
[15:12]<aa-mggvjg>how do i get a random float in c#
[15:12]<aa-mggvjg>in java it was in the Math class
[15:12]<aa-mggvjg>in c# it's not
[15:13]<wyfaj>System.Random
[15:14]<drdyrrr_>well Random will give you a next double
[15:14]<wyfaj>enough to construct a random float :)
[15:14]<wyfaj>buk: passing a player obj. ref from the client shouldnt be any more expensive that calling a method on the player object
[15:14]<wyfaj>than*
[15:15]<drdyrrr_>http://www.cambiaresearch.com/cambia3/snippets/csharp/classes/RandomProvider.aspx
[15:15]<drdyrrr_>nice class that does random singles as well as ranged integers
[15:16]<drdyrrr_>and random dates :D
[15:16]<2uc>wilco: right, I'll try that. Thanks. :)
[15:16]<wyfaj>buk: instead of a design where you call foobar(Player p), you could probably (if you dont already do so) redesign a little so your code looks like player.foobar()
[15:17]<aa-mggvjg>thx
[15:21]<mjzymygo>wilco: did buk say what remoting model he was using?
[15:21]<mjzymygo>CA/SA/SAS?
[15:22]<2uc>mmmh, how do I pass a reference of "this"?
[15:22]<mjzymygo>buk: is the class you are sending serialisable?
[15:23]<2uc>not yet I think
[15:23]<mjzymygo>buk: Client Activated? Server Activated? Server Activated Singleton?
[15:24]<drdyrrr_>Moridin8, http://www.damieng.com/blog/archive/2006/05/24/IEnumerable_T_to_IEnumerable_SubClassOfT.aspx
[15:24]<drdyrrr_>thats what i was talking about last time we spoke.
[15:25]<wyfaj>buk: http://www.thinktecture.com/Resources/RemotingFAQ/RemotingUseCases.html
[15:25]<mjzymygo>buk: Implement Iserializable...
[15:25]<mjzymygo>buk: You using SoapFormatter or Binary Formatter?
[15:26]<2uc>nothing at all :)
[15:26]<wyfaj>sure you are, unless you're not transferring any data at all
[15:27]<2uc>well, I didnt define anything of that at all :)
[15:28]<mjzymygo>Damieng_: I see what you were aiming at now.
[15:28]<mjzymygo>I prefer decoupling using an interface on a base class
[15:28]<wyfaj>probably binary formatter by default.. although its not really relevant at this point
[15:29]<wyfaj>Moridin8: he wants to send a reference... implementing iserializable doesnt buy him anything
[15:29]<wyfaj>buk: your "this" object should probably implement marshalbyref, and in that case you can simply pass "this" to the server
[15:29]<mjzymygo>wilco: wilco... all objects are serialized when sent as a reference.
[15:30]<2uc>If I define a list "List<IPokerClient> clientList = new List<IPokerClient>();" ... why cant I do "clientList.Exists(aPokerClient);" ?
[15:30]<wyfaj>yes, based on what kind of object you're transferring







