func (pt *InPort) CloseConnection(rptName string) {
	pt.closeLock.Lock()
	delete(pt.RemotePorts, rptName)
	if len(pt.RemotePorts) == 0 {
		close(pt.Chan)
	}
	pt.closeLock.Unlock()
}
CloseConnection closes the connection to the remote out-port with name
rptName, on the InPort
package scipipe
import (
	"fmt"
	"strconv"
	"sync"
)
type InPort struct {
	Chan        chan *FileIP
	name        string
	process     WorkflowProcess
	RemotePorts map[string]*OutPort
	ready       bool
	closeLock   sync.Mutex
}
func NewInPort(name string) *InPort {
	inp := &InPort{
		name:        name,
		RemotePorts: map[string]*OutPort{},
		Chan:        make(chan *FileIP, getBufsize()),  
		ready:       false,
	}
	return inp
}
func (pt *InPort) Name() string {
	return pt.Process().Name() + "." + pt.name
}
func (pt *InPort) Process() WorkflowProcess {
	if pt.process == nil {
		pt.Fail("No connected process!")
	}
	return pt.process
}
func (pt *InPort) SetProcess(p WorkflowProcess) {
	pt.process = p
}
func (pt *InPort) AddRemotePort(rpt *OutPort) {
	if pt.RemotePorts[rpt.Name()] != nil {
		pt.Failf("A remote port with name (%s) already exists", rpt.Name())
	}
	pt.RemotePorts[rpt.Name()] = rpt
}
func (pt *InPort) From(rpt *OutPort) {
	pt.AddRemotePort(rpt)
	rpt.AddRemotePort(pt)
	pt.SetReady(true)
	rpt.SetReady(true)
}
func (pt *InPort) Disconnect(rptName string) {
	pt.removeRemotePort(rptName)
	if len(pt.RemotePorts) == 0 {
		pt.SetReady(false)
	}
}
func (pt *InPort) removeRemotePort(rptName string) {
	if _, ok := pt.RemotePorts[rptName]; !ok {
		pt.Failf("No remote port with name (%s) exists", rptName)
	}
	delete(pt.RemotePorts, rptName)
}
func (pt *InPort) SetReady(ready bool) {
	pt.ready = ready
}
func (pt *InPort) Ready() bool {
	return pt.ready
}
func (pt *InPort) Send(ip *FileIP) {
	pt.Chan <- ip
}
func (pt *InPort) Recv() *FileIP {
	return <-pt.Chan
}