Lines Matching defs:iceConn

51 	IceConn		iceConn,
55 if (!iceConn->scratch || size > iceConn->scratch_size)
57 free (iceConn->scratch);
59 iceConn->scratch = malloc (size);
60 iceConn->scratch_size = size;
63 return (iceConn->scratch);
73 IceConn iceConn
76 iceConn->io_ok = False;
78 if (iceConn->connection_status == IceConnectPending)
88 if (iceConn->process_msg_info)
90 for (int i = iceConn->his_min_opcode;
91 i <= iceConn->his_max_opcode; i++)
95 process = &iceConn->process_msg_info[i - iceConn->his_min_opcode];
104 (*IOErrProc) (iceConn);
109 (*_IceIOErrorHandler) (iceConn);
119 IceConn iceConn
126 if (_X_UNLIKELY(iceConn->outbufptr > iceConn->outbufmax))
128 IceFatalIOError (iceConn);
132 _IceWrite (iceConn,
133 (unsigned long) (iceConn->outbufptr - iceConn->outbuf),
134 iceConn->outbuf);
136 iceConn->outbufptr = iceConn->outbuf;
143 IceConn iceConn
146 return (iceConn->outbufmax - iceConn->outbuf);
152 IceConn iceConn
155 return (iceConn->inbufmax - iceConn->inbuf);
166 IceConn iceConn
169 return (iceConn->connection_status);
175 IceConn iceConn
178 return strdup(iceConn->vendor);
184 IceConn iceConn
187 return strdup(iceConn->release);
193 IceConn iceConn
196 return (_IceVersions[iceConn->my_ice_version_index].major_version);
202 IceConn iceConn
205 return (_IceVersions[iceConn->my_ice_version_index].minor_version);
211 IceConn iceConn
214 return (_IceTransGetConnectionNumber (iceConn->trans_conn));
220 IceConn iceConn
223 if (iceConn->connection_string)
225 return strdup(iceConn->connection_string);
234 IceConn iceConn
237 return (iceConn->send_sequence);
243 IceConn iceConn
246 return (iceConn->receive_sequence);
252 IceConn iceConn
255 return (iceConn->swap);
269 register IceConn iceConn,
281 if (iceConn->io_ok)
282 nread = _IceTransRead (iceConn->trans_conn, ptr, (int) nleft);
291 if (iceConn->want_to_close)
298 _IceConnectionClosed (iceConn); /* invoke watch procs */
304 IceFatalIOError (iceConn);
326 register IceConn iceConn,
336 _IceRead (iceConn, rbytes, temp);
349 register IceConn iceConn,
361 if (iceConn->io_ok)
362 nwritten = _IceTransWrite (iceConn->trans_conn, ptr, (int) nleft);
371 IceFatalIOError (iceConn);
384 IceConn iceConn,
393 else if (iceConn->process_msg_info == NULL)
395 iceConn->process_msg_info = malloc (sizeof (_IceProcessMsgInfo));
396 iceConn->his_min_opcode = iceConn->his_max_opcode = hisOpcode;
398 else if (hisOpcode < iceConn->his_min_opcode)
400 _IceProcessMsgInfo *oldVec = iceConn->process_msg_info;
401 int oldsize = iceConn->his_max_opcode - iceConn->his_min_opcode + 1;
402 int newsize = iceConn->his_max_opcode - hisOpcode + 1;
405 iceConn->process_msg_info = malloc (
408 if (iceConn->process_msg_info == NULL) {
409 iceConn->process_msg_info = oldVec;
413 memcpy (&iceConn->process_msg_info[
414 iceConn->his_min_opcode - hisOpcode], oldVec,
419 for (i = hisOpcode + 1; i < iceConn->his_min_opcode; i++)
421 iceConn->process_msg_info[i -
422 iceConn->his_min_opcode].in_use = False;
424 iceConn->process_msg_info[i -
425 iceConn->his_min_opcode].protocol = NULL;
428 iceConn->his_min_opcode = hisOpcode;
430 else if (hisOpcode > iceConn->his_max_opcode)
432 _IceProcessMsgInfo *oldVec = iceConn->process_msg_info;
433 int oldsize = iceConn->his_max_opcode - iceConn->his_min_opcode + 1;
434 int newsize = hisOpcode - iceConn->his_min_opcode + 1;
437 iceConn->process_msg_info = malloc (
440 if (iceConn->process_msg_info == NULL) {
441 iceConn->process_msg_info = oldVec;
445 memcpy (iceConn->process_msg_info, oldVec,
450 for (i = iceConn->his_max_opcode + 1; i < hisOpcode; i++)
452 iceConn->process_msg_info[i -
453 iceConn->his_min_opcode].in_use = False;
455 iceConn->process_msg_info[i -
456 iceConn->his_min_opcode].protocol = NULL;
459 iceConn->his_max_opcode = hisOpcode;
462 iceConn->process_msg_info[hisOpcode -
463 iceConn->his_min_opcode].in_use = True;
465 iceConn->process_msg_info[hisOpcode -
466 iceConn->his_min_opcode].my_opcode = myOpcode;
468 iceConn->process_msg_info[hisOpcode -
469 iceConn->his_min_opcode].protocol = &_IceProtocols[myOpcode - 1];
475 IceGetPeerName (IceConn iceConn)
477 return (_IceTransGetPeerNetworkId (iceConn->trans_conn));
482 _IceGetPeerName (IceConn iceConn)
484 return (IceGetPeerName(iceConn));