Nevie niekto, ci sa da nejakym sposobom vypozicat bakalarka z minuleho roku?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Zobrazi» príspevky MenuQuote from: ursus on 01.11.2011, 20:28:16Quote from: vreckovka789 on 31.10.2011, 23:41:56
...
ukaz konstruktor ShareMeImpl
31.10.2011 16:34:20 at.ac.tuwien.infosys.rnue.implementation.ShareMeImpl start
SEVERE: null
java.rmi.ConnectException: Connection refused to host: dslab; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Naming.java:111)
at at.ac.tuwien.infosys.rnue.implementation.ShareMeImpl.start(Unknown Source)
at at.ac.tuwien.infosys.rnue.helpers.search.SearchMain.main(SearchMain.java:56)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:189)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 7 more
ShareMe server started.
Quote from: revelc on 19.05.2011, 19:55:02
Ja nemam Minesweeper, mam vlastny projekt, ktory som nemohol odovzdat cviciacemu (ten mi dal za neho iba zapocet) ale musim ho odovzdat u Porubana
Quote from: LubomirR on 26.04.2011, 20:45:49Quote from: vreckovka789 on 26.04.2011, 17:29:04
Robim zadanie a neviem si rady s TCP pripojenim. Uz 4 hodiny sa s tym babrem a nie a nie sa nanho pripojit.. strukturu mam taktostruct sockaddr_in adresa;
adresa.sin_family = AF_INET;
adresa.sin_addr.s_addr = inet_addr("127.0.0.1");
adresa.sin_port = 6789;
bzero(&(adresa.sin_zero), 8);
a napajam sa takto:int sockfd = socket(PF_INET, SOCK_STREAM,0);
connect (sockfd, (struct sockaddr *) &adresa, sizeof(adresa));
ale connect mi vzdy vracia chybu Connection refused .. v zadani je napisane ze sa mam pripojit na tcp port s ip 127.0.0.1 .. neviete mi poradit kde robim chybu?
sin_port musà byť v network byte order (big endian). Použi funkciu htons na prekonvertovanie:
adresa.sin_port = htons(6789);
struct sockaddr_in adresa;
adresa.sin_family = AF_INET;
adresa.sin_addr.s_addr = inet_addr("127.0.0.1");
adresa.sin_port = 6789;
bzero(&(adresa.sin_zero), 8);
int sockfd = socket(PF_INET, SOCK_STREAM,0);
connect (sockfd, (struct sockaddr *) &adresa, sizeof(adresa));