예제 #1
0
파일: ViaImpl.go 프로젝트: hinike/gosips
/**
 * Set the host part of this ViaHeader to the newly supplied <code>host</code>
 * parameter.
 *
 * @return host - the new interger value of the host of this ViaHeader
 * @throws ParseException which signals that an error has been reached
 * unexpectedly while parsing the host value.
 */
func (this *Via) SetHostFromString(host string) (ParseException error) {
	if this.sentBy == nil {
		this.sentBy = core.NewHostPort()
	}
	//try {
	h := core.NewHost(host)
	this.sentBy.SetHost(h)
	//}
	//catch(Exception e) {
	//    throw new  NullPointerException(" host parameter is null");
	//}
	return nil
}
예제 #2
0
파일: ViaImpl.go 프로젝트: hinike/gosips
/**
 * Set the port part of this ViaHeader to the newly supplied <code>port</code>
 * parameter.
 *
 * @param port - the new interger value of the port of this ViaHeader
 */
func (this *Via) SetPort(port int) {
	if this.sentBy == nil {
		this.sentBy = core.NewHostPort()
	}
	this.sentBy.SetPort(port)
}
예제 #3
0
파일: Authority.go 프로젝트: hinike/gosips
/**
 * Set the port.
 * @param port int to set
 */
func (this *Authority) SetPort(port int) {
	if this.hostPort == nil {
		this.hostPort = core.NewHostPort()
	}
	this.hostPort.SetPort(port)
}
예제 #4
0
파일: ViaImpl.go 프로젝트: hinike/gosips
/** set the Host of the Via Header
 * @param host String to set
 */
func (this *Via) SetHost(host *core.Host) {
	if this.sentBy == nil {
		this.sentBy = core.NewHostPort()
	}
	this.sentBy.SetHost(host)
}
예제 #5
0
파일: Authority.go 프로젝트: hinike/gosips
/**
 * set the host.
 * @param host Host to set
 */
func (this *Authority) SetHost(host *core.Host) {
	if this.hostPort == nil {
		this.hostPort = core.NewHostPort()
	}
	this.hostPort.SetHost(host)
}